📥 Download File
This API downloads the translated or OCR-processed document. Optionally, you can convert a PDF to another format such as PPTX or Word during download.
📋 Basic Information
- Method:
GET
- Path:
https://api.bluente.com/api/20250924/blu_translate/download
- Authentication: Required —
Authorization: Bearer $BLUENTE_API_KEY
📝 Request Parameters
Query String
Field | Type | Required | Description |
---|---|---|---|
id | int | Yes | Task ID returned from Upload File API |
to_type | string | Yes | Output format if converting PDF. Options: "pptx" , "word" . ⚠️Otherwise, keep it in the original file format, such as "pdf" . |
Request Body
-
(none required)
💡 Example (Download as Original File)
curl -X GET "https://api.bluente.com/api/20250924/blu_translate/download?id=1&to_type=pdf" \
-H "Authorization: Bearer $BLUENTE_API_KEY" \
-o translated_file.pdf
or
fetch("https://api.bluente.com/api/20250924/blu_translate/download?id=1&to_type=pdf", {
method: "GET",
headers: {
"Authorization": "Bearer $BLUENTE_API_KEY"
}
})
📄 Example (Convert PDF to Word)
curl -X GET "https://api.bluente.com/api/20250924/blu_translate/download?id=1&to_type=word" \
-H "Authorization: Bearer $BLUENTE_API_KEY" \
-o translated_file.docx
or
fetch("https://api.bluente.com/api/20250924/blu_translate/download?id=1&to_type=word", {
method: "GET",
headers: {
"Authorization": "Bearer $BLUENTE_API_KEY"
}
})
📊 Example (Convert PDF to PPTX)
curl -X GET "https://api.bluente.com/api/20250924/blu_translate/download?id=1&to_type=pptx" \
-H "Authorization: Bearer $BLUENTE_API_KEY" \
-o translated_file.pptx
or
fetch("https://api.bluente.com/api/20250924/blu_translate/download?id=1&to_type=pptx", {
method: "GET",
headers: {
"Authorization": "Bearer $BLUENTE_API_KEY"
}
})
✅ Success Response Example
The response is a binary stream of the translated file. Example (not actual JSON):
%PDF-1.4
...
(binary data)
...
❌ Error Response Example
{
"message": "file not found",
"code": 404
}
📌 Notes
- The
id
must be obtained from the Upload File API. - Ensure the translation task status is
READY
before calling this API (check via Get Translation Status). - If
to_type
is provided and the source is a PDF, the file will be converted to the requested format. - The response must be saved as a binary file (e.g.,
.pdf
,.docx
,.pptx
).