Léon AI · REST API
API Reference
The LÉON REST API lets you push files into the Global Lingo translation platform programmatically — pick a workflow, set source and target languages, and pull the output.
Authentication
Every request must include an API key issued by Global Lingo.
Pass the
key in the Authorization header on every call.
Keys are environment-scoped (sandbox / production).
Request an API key from your Global Lingo contact.
leon-ai.app.
Base URL & versioning
All endpoints sit under the versioned /api/v1/ namespace.
Breaking changes ship as a new major version; additive changes are
released against the current version.
Submission lifecycle (file mode)
A complete round-trip is three calls: submit the source file, poll for readiness, download the localised outputs. LÉON orchestrates the machine-translation, post-editing, and quality steps in between.
Upload the source, choose a workflow, declare languages. Returns requestId.
Poll until status flips from In_progress to Ready. Recommended cadence: 30 s.
Pull a single zip with one subfolder per target locale.
File import
Submit a file for translation. The API accepts a single source document (monolingual, or multilingual with existing translations).
A multipart/form-data request: the file rides as a binary
part, the rest of the parameters as form fields.
Headers
| Header | Description |
|---|---|
| Authorization string required |
API key authentication. Must be in the form Bearer {your-api-key}.
Keys are environment-scoped. Request yours from your Global Lingo contact.
|
| Content-Type string required |
Must be multipart/form-data with a valid boundary.
Most HTTP clients set this automatically when sending a multipart body.
|
Body parameters
| Field | Description |
|---|---|
| file binary · multipart required | The source document. Sent as the file part of a multipart form upload. Max 100 MB · See supported file types |
| source-language string required |
Source language code of the uploaded file.
Examples: en, fr_fr, zh_cn
|
| target-languages array<string> required | One or more target locales. Each becomes a sub-folder in the final zip export. Sent as repeated form fields or a JSON array string. |
| workflow enum · string required | Type of service to be performed. human-translation proofreading-only post-editing ai-only |
| type enum · string required |
Whether the source is monolingual or already contains
target-language translations to be reviewed.
monolingual
multilingual
multilingual implies the file already has a populated translations in the target elements/columns (only applicable to CSV, XLSX, XML and XLF files).
|
| due-date string · ISO 8601 optional |
Requested delivery date / time, e.g. 2026-05-12T17:00:00Z.
|
| project-name string optional | Your name or reference for the project. Shown to the translation team and stored with the request. Max 150 characters. |
| translation-instructions string optional | Free-text guidance for the translators: tone, terminology, audience, what not to translate, etc. Max 50,000 characters. Line breaks are preserved. |
| submitter string optional | Name or email of the person submitting the request, for follow-up questions. Max 150 characters. |
Response
Returns a confirmation message and the requestId you'll use to poll for status and download outputs.
Text import
Submit plain text for translation.
An application/json request: all parameters, including the source text, are sent as JSON fields.
Headers
| Header | Description |
|---|---|
| Authorization string required |
API key authentication. Must be in the form Bearer {your-api-key}.
Keys are environment-scoped. Request yours from your Global Lingo contact.
|
| Content-Type string required |
Must be application/json.
|
Body parameters
| Field | Description |
|---|---|
| text string required | The source text to translate, encoded as a UTF-8 JSON string. Max 50 000 characters. |
| source-language string required |
Source language code of the supplied text.
Examples: en, fr_fr, zh_cn
|
| target-languages array<string> required | One or more target locales. Each becomes a key in the response translations map. Sent as a JSON array of locale strings (ISO 639 language + ISO 3166 region). |
| due-date string · ISO 8601 optional |
Requested delivery date / time, e.g. 2026-05-12T17:00:00Z.
|
Response
Returns a confirmation message and the requestId you'll use to poll for status and download outputs.
Instant translate
Translate plain text with AI and receive the result in the same response.
A synchronous application/json request: the text is machine-translated and the translation
is returned in the response body.
Headers
| Header | Description |
|---|---|
| Authorization string required |
API key authentication. Must be in the form Bearer {your-api-key}.
Keys are environment-scoped. Request yours from your Global Lingo contact.
|
| Content-Type string required |
Must be application/json.
|
Body parameters
| Field | Description |
|---|---|
| text string required | The source text to translate, encoded as a UTF-8 JSON string. Max 10 000 characters. |
| target-language string required |
The single target locale to translate into (ISO 639 language + ISO 3166 region).
Example: fr_fr
|
| source-language string optional |
Source language code of the supplied text. Omit it to have the source language detected automatically.
Examples: en, fr_fr, zh_cn
|
Response
Returns a single translation field holding the translated text.
Limited to 60 requests per minute. A 429 carries a Retry-After header.
Status
Poll this endpoint to check whether a submission has finished processing.
Returns the current status of the submission.
Headers
| Header | Description |
|---|---|
| Authorization string required |
API key authentication. Must be in the form Bearer {your-api-key}.
|
Path parameters
| Field | Description |
|---|---|
| requestId string required | The id returned by POST /file-import. |
Response values
| In_progress status | The job is still running. Continue polling. |
| Ready status | All target locales are processed and available for download. |
File export
Fetch the final localised output as a single zip. Available once status is Ready.
Returns a binary application/zip stream. Inside, each
target locale lives in its own sub-folder.
Headers
| Header | Description |
|---|---|
| Authorization string required |
API key authentication. Must be in the form Bearer {your-api-key}.
|
Response
├─ fr_fr/
│ └─ source-doc.docx
├─ de_de/
│ └─ source-doc.docx
├─ ja_jp/
│ └─ source-doc.docx
└─ zh_cn/
└─ source-doc.docx
Text export
Fetch the translations for a text-import submission as a JSON object. Available once status is Ready.
Returns an application/json body with one key per target
locale, each containing the translated text string.
Headers
| Header | Description |
|---|---|
| Authorization string required |
API key authentication. Must be in the form Bearer {your-api-key}.
|
Response
The translations object maps each requested target locale
to its translated text string.
Errors & status codes
The API uses conventional HTTP status codes. Error bodies always include a machine-readable code and a human-readable message.
| Code | Meaning |
|---|---|
| 200OK | Request succeeded. |
| 400Bad Request | Missing or invalid parameter — check text, source-language, target-language(s), workflow, and the file part. |
| 401Unauthorized | API key missing, malformed, or revoked. |
| 404Not Found | requestId does not exist or belongs to another tenant. |
| 409Not Ready | Download requested before the submission was Ready. |
| 413Payload Too Large | File exceeds the 100 MB limit. |
| 415Unsupported Media Type | File format not supported. See supported file types. |
| 429Too Many Requests | Rate limit exceeded. See Retry-After. |
| 5xxServer Error | Léon AI server fault. Safe to retry with backoff. |
Workflows
Choose the post-MT pipeline that matches your quality bar and turnaround.
|
human-translation
slowest (id: 1) |
For fully human workflow with no AI or MT involved. Use for highly regulated content. Typical turnaround: days. |
|
post-editing
balanced (id: 2) |
LÉON generates an AI MT output that is then reviewed and corrected by a professional linguist for accuracy and fluency. The default workflow. Typical turnaround: same-day to 2 days. |
|
proofreading-only
multilingual input (id: 3) Typical turnaround: same-day to 2 days. |
Submit a multilingual file already containing translations (for example, an AI MT output). A linguist reviews and refines the existing translations.
|
|
ai-only
fastest (id: 4) |
LÉON's AI output is delivered with automated quality scoring and no human review. Use for low-risk, high-volume or time-critical content. Typical turnaround: minutes. |
Language codes
Source and target languages use the Léon locale codes (lowercase, snake-cased, e.g. fr_ca, zh_tw).
Browse all 138 language codes Searchable reference · click any code to copy
Supported file types
Léon preserves layout, tags, and inline formatting on round-trip.
Unsupported extensions return 415 Unsupported Media Type.
Rate limits
Each API key is granted a per-minute and per-day quota. Limits are returned in standard headers on every response:
| X-RateLimit-Limit | Requests permitted per minute. |
| X-RateLimit-Remaining | Requests left in the current window. |
| X-RateLimit-Reset | UTC epoch second when the window resets. |
| Retry-After | Returned on 429 — wait this many seconds before retrying. |
© 2026 Global Lingo · Léon AI · v1.2 Need help? leon@global-lingo.com