POST
/translate/file
Requires Auth
Translate uploaded file (Synchronous/Asynchronous)
Upload and translate a file. Supports both sync and async modes. Use POST for direct file uploads instead of URLs. Supports bilingual mode to keep original text alongside translation.
Parameters
File Upload RequiredFile Upload Endpoint
This endpoint requires file uploads. Use the cURL command below or an API client (Postman, Insomnia, etc.) to test this endpoint. File uploads cannot be tested directly in the browser.
Code Examples
curl -X POST \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{}' \
'https://nexus-api.dhurgham.dev/api/file-translation-api/translate/file'
Request Information
Example cURL Request
curl -X POST \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-d '{}' \
'https://nexus-api.dhurgham.dev/api/file-translation-api/translate/file'
Request Schema
Request Body
-
filestring File Upload Required required - File to translate (PDF, DOCX, DOC, TXT, PNG, JPG, JPEG)
- Use cURL or API client to upload files
-
targetstring Optional - Target language code (ISO 639-1). Default: en
-
formatstring Optional - Response format
-
asyncstring Optional - Enable asynchronous processing. Use 'true' for large files.
-
bilingualstring Optional - Enable bilingual mode. When true, original text is kept and translation is added below it. Also accepts: keep_original, dual_language, show_original as aliases.
Responses
200
Success
{
"success": true,
"download_url": "https://nexus-api.dhurgham.dev/api/file-translation-api/dl/abc123",
"message": "Translation completed successfully",
"text": "string"
}
Response Schema
-
successboolean -
Example:
1 -
download_urlstring - Download URL for translated file
-
Example:
https://nexus-api.dhurgham.dev/api/file-translation-api/dl/abc123 -
messagestring -
Example:
Translation completed successfully -
textstring - Translated text (for images only)
Subscription Plans
Basic
Basic plan
$5,000.00/month
- 1,000 requests/month
- 100 requests/hour
- 20 requests/minute