POST /translate/file Requires Auth

Translate uploaded file (Synchronous/Asynchronous)

Back to API

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 Required

File 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

file string File Upload Required required
File to translate (PDF, DOCX, DOC, TXT, PNG, JPG, JPEG)
Use cURL or API client to upload files
target string Optional
Target language code (ISO 639-1). Default: en
format string Optional
Response format
async string Optional
Enable asynchronous processing. Use 'true' for large files.
bilingual string 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

success boolean
Example: 1
download_url string
Download URL for translated file
Example: https://nexus-api.dhurgham.dev/api/file-translation-api/dl/abc123
message string
Example: Translation completed successfully
text string
Translated text (for images only)

Endpoint URL

https://nexus-api.dhurgham.dev/api/file-translation-api/translate/file

Subscription Plans

Basic

Basic plan

$5,000.00/month

  • 1,000 requests/month
  • 100 requests/hour
  • 20 requests/minute
Login to Subscribe

free

$0.00/month

  • 1,000 requests/month
  • 1000 requests/hour
  • 1000 requests/minute
Login to Subscribe