Translate Document
Translate documents to one or multiple languages simultaneously.
Endpoint
POST /api/v3/speech-to-text/session/{sessionId}/document/{documentId}/translate-multiple
Request
{
"languages": ["fr", "de", "nl"],
"filename": "meeting-notes"
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
languages | string[] | Yes | Array of target language codes (e.g., ["fr", "de"]) |
filename | string | No | Custom filename for translated documents |
Response Modes
The API returns different formats based on the request:
Single Language - JSON Response
When translating to one language, returns JSON with document info:
Status: 200 OK
{
"result": {
"document_id": "doc_translated_456",
"session_id": "sess_abc123",
"language": "fr",
"filename": "meeting-notes-fr.docx",
"status": "completed"
}
}
Multiple Languages - ZIP File
When translating to multiple languages, returns a ZIP archive containing all translations:
Status: 200 OK
Content-Type: application/zip
Headers:
Content-Disposition: attachment; filename="translations.zip"
The ZIP file contains:
meeting-notes-fr.docxmeeting-notes-de.docxmeeting-notes-nl.docx
Supported Languages
Scriptix supports 30+ languages for translation:
Common Languages
| Code | Language |
|---|---|
en | English |
es | Spanish |
fr | French |
de | German |
it | Italian |
pt | Portuguese |
nl | Dutch |
pl | Polish |
ru | Russian |
ja | Japanese |
zh | Chinese |
ar | Arabic |
Get Supported Language Pairs
curl https://api.scriptix.io/api/v4/glossaries/supported-languages \
-H "Authorization: Bearer YOUR_API_KEY"
Examples
Translate to Single Language
curl -X POST https://api.scriptix.io/api/v3/speech-to-text/session/sess_abc123/document/doc_xyz789/translate-multiple \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"languages": ["fr"],
"filename": "meeting-notes"
}'
Response:
{
"result": {
"document_id": "doc_fr_456",
"language": "fr",
"filename": "meeting-notes-fr.docx"
}
}
Translate to Multiple Languages
curl -X POST https://api.scriptix.io/api/v3/speech-to-text/session/sess_abc123/document/doc_xyz789/translate-multiple \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"languages": ["fr", "de", "nl", "es"],
"filename": "meeting-notes"
}' \
-o translations.zip
Downloads a ZIP file with all four translations.
Translation with Glossaries
Use custom glossaries to ensure consistent terminology translation.
Create Glossary
curl -X POST https://api.scriptix.io/api/v4/glossaries \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Technical Terms",
"source_language": "en",
"target_language": "fr",
"entries": [
{"source": "API", "target": "API"},
{"source": "database", "target": "base de données"}
]
}'
List Glossaries
curl https://api.scriptix.io/api/v4/glossaries \
-H "Authorization: Bearer YOUR_API_KEY"
Update Glossary
curl -X PATCH https://api.scriptix.io/api/v4/glossaries/{glossaryId} \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Updated Technical Terms"
}'
Delete Glossary
curl -X DELETE https://api.scriptix.io/api/v4/glossaries/{glossaryId} \
-H "Authorization: Bearer YOUR_API_KEY"
Glossaries are automatically applied during translation when the source/target language pair matches.
Translation Behavior
Document Creation
- Each translation creates a new document in the same session
- Original document remains unchanged
- Translated documents are linked to the source document
Filename Convention
Translated documents follow this naming:
- Pattern:
{filename}-{language_code}.{extension} - Example:
meeting-notes-fr.docx,meeting-notes-de.docx
Content Preservation
Translation preserves:
- Text content (translated)
- Timestamps (unchanged)
- Speaker labels (unchanged)
- Document structure (unchanged)
- Formatting (preserved where possible)
Error Responses
See Error Handling for complete error reference.
Common errors:
- 422: Invalid language code
- 404: Document not found
- 400: Invalid parameters
Best Practices
- Use ISO language codes (e.g., 'fr', not 'french')
- Batch multiple languages in one request to reduce API calls
- Handle both JSON (single) and ZIP (multiple) responses
- Use glossaries for consistent terminology
- Review translation quality, especially for technical content
Limitations & Cost
- Maximum 10 languages per request
- Large documents (>100K words) may take several minutes
- Translation cost multiplies per language (3 languages = 3× cost)
Related
- Documents Overview - Complete API reference
- Retrieve Document - Get translated document
- Export Document - Export translated documents
- Glossaries API - Custom terminology management