GET /translate/file Requires Auth

Translate file from URL (Synchronous)

Back to API

Translates a file from URL synchronously. Returns HTML page by default or JSON if format=json. Use this for small files (< 10MB). Supports bilingual mode to keep original text alongside translation.

Parameters

file * required (query)
string query

URL of the file to translate (must be publicly accessible)

target (query)
string query

Target language code (ISO 639-1). Default: en

format (query)
string query

Response format

async (query)
string query

Enable asynchronous processing. Use 'true' for large files to avoid timeouts.

bilingual (query)
string query

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.

Code Examples

curl -X GET \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  'https://nexus-api.dhurgham.dev/api/file-translation-api/translate/file?file=https%3A%2F%2Fexample.com%2Fdocument.pdf&target=ar&format=html&async=false&bilingual=false'

Request Information

Example cURL Request

curl -X GET \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  'https://nexus-api.dhurgham.dev/api/file-translation-api/translate/file?file=https%3A%2F%2Fexample.com%2Fdocument.pdf&target=ar&format=html&async=false&bilingual=false'

Request Schema

Query Parameters

file string required query
URL of the file to translate (must be publicly accessible)
Example: https://example.com/document.pdf
target string Optional query
Target language code (ISO 639-1). Default: en
Default: en
Example: ar
Allowed values: en, ar, fr, es, de, zh, ja, ru, pt, it, ko, hi, tr, fa
format string Optional query
Response format
Default: html
Example: html
Allowed values: html, json
async string Optional query
Enable asynchronous processing. Use 'true' for large files to avoid timeouts.
Default: false
Example: false
Allowed values: true, false
bilingual string Optional query
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.
Default: false
Example: false
Allowed values: true, false, keep_original, dual_language, show_original

Responses

200 Success
{
    "success": true,
    "download_url": "https://nexus-api.dhurgham.dev/api/file-translation-api/dl/abc123",
    "message": "Translation completed successfully"
}

Response Schema

success boolean
Example: 1
download_url string
Example: https://nexus-api.dhurgham.dev/api/file-translation-api/dl/abc123
message string
Example: Translation completed successfully

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