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.

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.

Parameters

File Upload Required

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'
Example cURL Request
curl -X POST \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -d '{}' \
  'https://nexus-api.dhurgham.dev/api/file-translation-api/translate/file'
frontend.example_response
{
    "success": true,
    "download_url": "https://nexus-api.dhurgham.dev/api/file-translation-api/dl/abc123",
    "message": "Translation completed successfully",
    "text": "string"
}