Léon AI Léon AI REST API v1.2

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.

HEADER Authorization: Bearer {your-api-key}

Keys are environment-scoped (sandbox / production).
Request an API key from your Global Lingo contact.

Requests over plain HTTP are rejected. All traffic must be HTTPS to 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.

BASE https://leon-ai.app/api/v1

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.

01 · SUBMIT
POST /file-import

Upload the source, choose a workflow, declare languages. Returns requestId.

02 · POLL
GET /status/{id}

Poll until status flips from In_progress to Ready. Recommended cadence: 30 s.

03 · DOWNLOAD
GET /{id}

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).

POST leon-ai.app/api/v1/external-submission/file-import

A multipart/form-data request: the file rides as a binary part, the rest of the parameters as form fields.

Headers

HeaderDescription
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

FieldDescription
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

200 OK  — submission accepted

Returns a confirmation message and the requestId you'll use to poll for status and download outputs.

Text import

Submit plain text for translation.

POST leon-ai.app/api/v1/external-submission/text-import

An application/json request: all parameters, including the source text, are sent as JSON fields.

Headers

HeaderDescription
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

FieldDescription
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

200 OK  — submission accepted

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.

POST leon-ai.app/api/v1/external-submission/instant-translate

A synchronous application/json request: the text is machine-translated and the translation is returned in the response body.

Headers

HeaderDescription
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

FieldDescription
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

200 OK  — translations returned inline

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.

GET leon-ai.app/api/v1/external-submission/status/{requestId}

Returns the current status of the submission.

Headers

HeaderDescription
Authorization string required API key authentication. Must be in the form Bearer {your-api-key}.

Path parameters

FieldDescription
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.
Use a backoff of 30 s between polls. Webhook callbacks are on the roadmap and will replace polling for most use-cases.

File export

Fetch the final localised output as a single zip. Available once status is Ready.

GET leon-ai.app/api/v1/external-submission/{requestId}

Returns a binary application/zip stream. Inside, each target locale lives in its own sub-folder.

Headers

HeaderDescription
Authorization string required API key authentication. Must be in the form Bearer {your-api-key}.

Response

200 OK · application/zip
translations.zip
├─ 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.

GET leon-ai.app/api/v1/external-submission/text/{requestId}

Returns an application/json body with one key per target locale, each containing the translated text string.

Headers

HeaderDescription
Authorization string required API key authentication. Must be in the form Bearer {your-api-key}.

Response

200 OK · application/json

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.

CodeMeaning
200OKRequest succeeded.
400Bad RequestMissing or invalid parameter — check text, source-language, target-language(s), workflow, and the file part.
401UnauthorizedAPI key missing, malformed, or revoked.
404Not FoundrequestId does not exist or belongs to another tenant.
409Not ReadyDownload requested before the submission was Ready.
413Payload Too LargeFile exceeds the 100 MB limit.
415Unsupported Media TypeFile format not supported. See supported file types.
429Too Many RequestsRate limit exceeded. See Retry-After.
5xxServer ErrorLé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.

.docx .pptx .xlsx .html .xml .json .md .csv .pdf .idml .xliff

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-LimitRequests permitted per minute.
X-RateLimit-RemainingRequests left in the current window.
X-RateLimit-ResetUTC epoch second when the window resets.
Retry-AfterReturned on 429 — wait this many seconds before retrying.

© 2026 Global Lingo · Léon AI · v1.2 Need help? leon@global-lingo.com