Endpoint reference
/translate/file
Requires Auth
Translate file from URL (Synchronous)
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.
Endpoint URL
Use this marketplace URL in your integration.
Code Examples
Replace YOUR_API_TOKEN with your own key. Store it on your server.
curl -X GET \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
'https://nexonapi.com/api/translation-of-documents-and-files/translate/file?file=https%3A%2F%2Fexample.com%2Fdocument.pdf&target=ar&format=html&async=false&bilingual=false'
Parameters
URL of the file to translate (must be publicly accessible)
Example:
https://example.com/document.pdf
Target language code (ISO 639-1). Default: en
Example:
ar
Allowed Values:
Response format
Example:
html
Allowed Values:
Enable asynchronous processing. Use 'true' for large files to avoid timeouts.
Example:
false
Allowed Values:
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.
Example:
false
Allowed Values:
curl -X GET \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
'https://nexonapi.com/api/translation-of-documents-and-files/translate/file?file=https%3A%2F%2Fexample.com%2Fdocument.pdf&target=ar&format=html&async=false&bilingual=false'
{
"success": true,
"download_url": "https://nexonapi.com/api/translation-of-documents-and-files/dl/abc123",
"message": "Translation completed successfully"
}