📤 Upload File
This API uploads a document for translation. Depending on the engine parameter, the request will be routed to either the LLM (Large Language Model) engine.
📋 Basic Information
- Method:
POST - Path:
https://api.bluente.com/api/20250924/blu_translate/upload - Authentication: Required —
Authorization: Bearer $BLUENTE_API_KEY
📝 Request Parameters
Query String
| Field | Type | Required | Description |
|---|---|---|---|
engine | int | Yes | Translation engine: 3 = LLM, 4 = LLM Pro |
Engine notes:
- LLM: Transformer-based, provides more natural and contextual translations (currently supports word-level translation only).
- LLM Pro: LLM with a larger model size, providing more accurate and context-aware translations.
Request Body (Form Data)
| Field | Type | Required | Description |
|---|---|---|---|
file | file | Yes | The file to upload |
💡 Example
curl -X POST "https://api.bluente.com/api/20250924/blu_translate/upload?engine=3" \
-H "Authorization: Bearer $BLUENTE_API_KEY" \
-F "file=@/path/to/document.pdf"or
const formData = new FormData();
formData.append("file", fileInput.files[0]);
fetch("https://api.bluente.com/api/20250924/blu_translate/upload?engine=3", {
method: "POST",
headers: {
"Authorization": "Bearer $BLUENTE_API_KEY"
},
body: formData
})✅ Success Response Example
{
"message": "success",
"code": 0,
"data": {
"id": 1,
"language": "",
"sub_task_ids": null
}
}📊 Response Fields
| Field | Type | Description |
|---|---|---|
message | string | Response message, usually "success" |
code | int | Status code, 0 means success |
data | object | Main payload |
└─ id | int | Task ID — used to query the translation task status |
└─ language | string | Reserved. Currently always empty — language is not detected at upload time |
└─ sub_task_ids | array | Only for multi-file uploads; null for a single file |
❌ Error Response Example
{
"message": "missing file from body",
"code": 40
}See Error Codes for all codes.
📌 Notes
- The returned
idshould be used in the Query Translation Status API. - File type must be supported by the Get Supported File Types API. InDesign files can be uploaded as
.inddor.idml. See InDesign (INDD and IDML). - The filename must include its extension (e.g.
report.pdf). A filename without an extension returnscode: 40. - Upload is asynchronous. The
idis returned as soon as the file is received, before the file is processed and its pages are counted. Problems with the file itself (unsupported, corrupt or password-protected files) are reported later by Get Translation Status as statusERROR. - Large files may take longer to process; ensure the request is sent as
multipart/form-data. - Choose
engine=3for LLM-based translations.