Documentation Index
Fetch the complete documentation index at: https://www.edenai.co/docs/llms.txt
Use this file to discover all available pages before exploring further.
Endpoint
POST /v3/universal-ai (sync)
Model string pattern: translation/document_translation/{provider}[/{model}]
| Field | Type | Required | Description |
|---|
| file | file_input | Yes | Document file ID from /v3/upload or direct file URL (PDF, DOCX, PPTX) |
| target_language | string | Yes | Target language code |
| source_language | string | No | Source language code |
Output
| Field | Type | Required | Description |
|---|
| file | string | Yes | |
| document_resource_url | string | Yes | |
Available Providers
| Provider | Model String | Price |
|---|
| deepl | translation/document_translation/deepl | $2 per 20 pages |
| google | translation/document_translation/google | $0.08 per page |
Quick Start
import requests
url = "https://api.edenai.run/v3/universal-ai"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
payload = {
"model": "translation/document_translation/deepl",
"input": {
"file": "YOUR_FILE_UUID_OR_URL",
"target_language": "fr",
"source_language": "en"
}
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())