localization.md

Developers

API documentation

How to request file translation, proofreading and bulk processing from your own code. Every request is charged on the same credit basis as the web app.

Contents

1. Overview

The localization.md API is a REST API that calls the same translation engines as the web app over HTTPS. Submit a file and get back a translation in the original format; the same flow also handles proofreading and bulk processing.

A single file, a few sentences or a large batch are all requested on the same credit basis. Each request is charged for the compute it actually uses.

Work that takes time runs asynchronously. You submit, receive a job ID, check the status and then download the result. Instead of asking for the status repeatedly, you can learn about completion from the event stream or webhooks.

Endpoints, headers and error codes are also described in the OpenAPI 3.1 definition openapi.yaml. Use it to generate client code or validate requests.

1.1 Job flow

The three steps of file translation
RequestWhat it does
POST /api/translateSends a file and options to create a job. Responds 202 with the job ID and status.
GET /api/jobs/{jobId}Returns the job status. Once complete, downloadUrl is filled in.
GET /api/jobs/{jobId}/downloadDownloads the result file. Responds 409 if it is not ready yet.
POST /api/jobs/{jobId}/editsEdits the translated document's blocks by block id, through the same save path as the web viewer. Pass expected for optimistic concurrency; 409 EDIT_CONFLICT if it changed since you read it.

1.2 Request types

File requests — translate or proofread a document file in its original format. The endpoints in this documentation are described for file requests.

Sentence requests — request by sentence, without a file. They don't start an engine container, so only translation tokens are deducted and the charge is naturally small. See section 6.

Bulk processing — large, non-urgent work grouped and processed asynchronously. It costs less, so it deducts less; there is no separate discount rate. See section 7.

2. Getting started

From setting up an account to receiving your first result file.

  1. Account and credits

    Sign in to the app and top up credits. The API deducts from the same balance as the web.

  2. Create an API key

    Create a key on the API keys screen in the app. The secret is shown only once, when it is issued.

  3. Submit a file

    Send a file and a target language to POST /api/translate and receive a job ID.

  4. Check status and download

    When the status becomes ready, fetch the result file from downloadUrl.

2.1 Send your first request

A request that translates a report into Korean. Replace YOUR_API_KEY with the key you created.

curl
curl -X POST https://localization.md/api/translate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-target-lang: ko" \
  -F "file=@report.docx"
JavaScript (Node.js 18+)
import { readFile } from 'node:fs/promises';

const form = new FormData();
form.append('file', new Blob([await readFile('report.docx')]), 'report.docx');

const res = await fetch('https://localization.md/api/translate', {
  method: 'POST',
  headers: { Authorization: 'Bearer YOUR_API_KEY', 'x-target-lang': 'ko' },
  body: form
});
const job = await res.json();
console.log(res.status, job.jobId, job.status);
Python (requests)
import requests

with open("report.docx", "rb") as f:
    res = requests.post(
        "https://localization.md/api/translate",
        headers={"Authorization": "Bearer YOUR_API_KEY", "x-target-lang": "ko"},
        files={"file": ("report.docx", f)},
    )
job = res.json()
print(res.status_code, job["jobId"], job["status"])

2.2 Read the response

An accepted submission returns 202 with the job details. Use jobId to check the status from then on.

202 Accepted
{
  "id": "JOB_ID",
  "jobId": "JOB_ID",
  "title": "report.docx",
  "outputName": "report.docx",
  "status": "queued",
  "logs": [],
  "downloadUrl": "",
  "uniJson": false
}

3. Authentication

Every request carries its credentials in the Authorization header. Server-to-server integrations use an API key; the Power Platform connector uses an OAuth 2.0 access token.

Missing or invalid credentials return 401 UNAUTHENTICATED. Accessing another user's job returns 403 FORBIDDEN.

3.1 API keys

You can create personal and organization API keys on the API keys screen in the app. The secret is shown only once, when it is issued, and keys can be rotated or revoked. Only organization admins manage organization keys.

Keys start with vte_. Only a hash of the key is stored on the server, so a lost key cannot be shown again — rotate it to get a new one. Lists show only the last 6 characters of a key.

A key has scopes and an optional expiry date. The default scopes are translation:submit (submit jobs) and translation:read (check status and download results).

3.2 Authorization header

HTTP
Authorization: Bearer YOUR_API_KEY
  • Use keys only on your server. Never put them in browser code, app bundles or URL query strings.

3.3 OAuth 2.0 (Power Platform)

The Power Automate custom connector calls on the user's behalf with OAuth 2.0 (the Microsoft Entra ID authorization code flow). It uses a single scope, user_impersonation.

3.4 Per-key limits

Each API key has a monthly spend cap (default $100) and a rate limit. Exceeding the rate limit returns 429 RATE_LIMITED. See section 12.

4. Base URL and request format

Base URL

All endpoints live under the /api path of https://localization.md. Only HTTPS is accepted.

Requests

  • File submissions are sent as multipart/form-data with a single file part, which must carry a file name (filename). The format is determined by the file extension.
  • Translation options (target language, task, processing mode and so on) are sent as request headers.
  • Other requests with a body, such as estimates, are sent as application/json.
  • CORS is not supported. The API is for server-to-server calls only, and responses carry no Access-Control-Allow-Origin header.

Responses

  • Response bodies are JSON. Only the result download returns the file itself.
  • Error responses carry "ok": false and a machine-readable code, plus numeric fields where relevant (e.g. limit, required). Branch on code. See section 11.
  • Amounts are integers in µUSD (millionths of a US dollar).

5. Document translation

Document translation runs in three steps: submit → check status → download. The result file has the same format as the original.

Submitting the same file again creates a new job that is charged separately. Follow the guidance in section 12 for retries.

5.1 Submit a file

POST/api/translate

Submits one file and creates a translation (or proofreading) job. If the balance is below the minimum, no job is created and the response is 402.

Request headers
NameTypeRequiredDescription
AuthorizationstringRequired

Bearer YOUR_API_KEY. See section 3.

x-target-langstringOptional

Target language code (e.g. ko, en, ja). If omitted, the service default is used. See 5.7 Language codes.

x-source-langstringOptional

Source language code. Send auto to have the language identified from the source.

x-llm-modelstringOptional

Translation model ID. Available values come from GET /api/translate/models. A value not on the list is processed with the default model.

x-exec-modestringOptional

parallel (default) or sequential — whether translation within one file runs in parallel or in order.

x-processingstringOptional

Send batch to use bulk processing. See section 7.

x-contextstringOptional

Background information that is not translated (up to 2,000 characters), sent as base64url-encoded UTF-8 text. It reduces mistranslation of short titles and sentences; because it is part of the translation input, it is charged as input tokens.

x-formalitystringOptional

default, more, less, prefer_more or prefer_less — the level of formality (such as polite or casual speech). more and less work only for target languages that support formality (otherwise 400 FORMALITY_UNSUPPORTED); prefer_* is ignored for languages without it. Check supportsFormality in 5.7. Not applied to proofreading jobs.

x-glossary-idstringOptional

ID of the glossary to apply. Send x-source-lang with it. See 5.8 Glossaries.

x-taskstringOptional

translate (default) or proofread. See section 8.

Request body (multipart/form-data)
NameTypeRequiredDescription
filefileRequired

One file to translate. The part must carry a file name; the format is determined by the extension. Supported formats are listed in 5.6.

curl
curl -X POST https://localization.md/api/translate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-source-lang: auto" \
  -H "x-target-lang: en" \
  -F "file=@slides.pptx"
402 Payment Required
{
  "ok": false,
  "code": "INSUFFICIENT_CREDITS",
  "required": 1000000,
  "available": 250000
}

5.2 Check job status

GET/api/jobs/{jobId}

Returns the job's current status and result details. Finished jobs also carry the final charged amount.

Job status (status)
ValueMeaning
queuedAccepted and waiting to be processed.
runningBeing processed.
batchingWaiting for, or being processed in, a bulk processing batch.
readyComplete. Fetch the result from downloadUrl.
failedFailed. The reason is in failCode and failSummary.
cancelledCancelled on request.
needs_decryptThe file is encrypted with a sensitivity label and could not be processed. Resubmit a decrypted file.
Response fields
FieldTypeDescription
jobIdstringJob ID (same value as id).
statusstringA status value from the table above.
title, outputNamestringSubmitted file name and result file name.
downloadUrlstringDownload path of a completed job. Empty string until complete.
failCode, failSummarystringPresent only on failed jobs.
settlementobjectCharge details of a finished job: status, chargedMicro, chargedUsd, balanceMicro.
batchobjectPresent only on bulk processing jobs. See section 7.
curl
curl https://localization.md/api/jobs/JOB_ID \
  -H "Authorization: Bearer YOUR_API_KEY"
200 OK
{
  "id": "JOB_ID",
  "jobId": "JOB_ID",
  "title": "report.docx",
  "outputName": "report.docx",
  "status": "ready",
  "downloadUrl": "/api/jobs/JOB_ID/download",
  "settlement": {
    "status": "settled",
    "chargedMicro": 412000,
    "chargedUsd": "$0.41",
    "balanceMicro": 9588000
  },
  "charged": 412000
}

5.3 Progress stream

GET/api/jobs/{jobId}/events

Receives job progress as Server-Sent Events (text/event-stream). Each message's data is JSON and is sent whenever the state changes.

It removes the need to poll the status, so it is recommended wherever you can keep a connection open.

5.4 Download the result

GET/api/jobs/{jobId}/download

Returns the result file in the original format. Responds 409 NOT_READY if it is not ready yet and 404 NO_OUTPUT if there is no result file.

curl
curl -L -o report.ko.docx \
  https://localization.md/api/jobs/JOB_ID/download \
  -H "Authorization: Bearer YOUR_API_KEY"

5.5 Cancel a job

POST/api/jobs/{jobId}/cancel

Cancels a job in progress. The response reports the outcome in outcome and the new state in status.

5.6 Supported formats

File formats that can be translated
CategoryFormats
SupportedPPT · PPTX · PDF · DOC · DOCX · HWPX · EPUB · AZW3 · MOBI · KFX
Other formatsThe submission is accepted, but the job ends as failed.

5.7 Language codes

Use the codes below in x-target-lang. The source language (x-source-lang) can be identified automatically with auto. The same list is available from GET /api/translate/languages; use type to get the source-language list and the target-language list separately.

Target language codes
CodeLanguage
ko한국어
enEnglish
zh-Hans简体中文
zh-Hant繁體中文
ja日本語
deDeutsch
frFrançais
esEspañol
pt-BRPortuguês (Brasil)
itItaliano
ruРусский
arالعربية
trTürkçe
viTiếng Việt
idBahasa Indonesia
  • Codes are case-insensitive. A malformed code returns 400 INVALID_LANGUAGE_CODE.
Listing languages — GET /api/translate/languages
NameTypeRequiredDescription
typequeryOptional

source returns the source-language list (with auto first); target returns the target-language list. If omitted, the target-language list is returned without per-language feature flags. Any other value returns 400 INVALID_LANGUAGE_TYPE.

supportsFormalitybooleanOptional

Present on each language when type is sent. true when formality can be set for that target language. Always false in the source list.

supportsGlossarybooleanOptional

Present on each language when type is sent. true when a glossary can be used with that language. Always false for auto.

5.8 Glossaries

Register source terms and their translations per language pair (dictionary) in a glossary, then name it with x-glossary-id when you submit a file; the translation follows that pair's entries. One glossary can hold several language-pair dictionaries.

A glossary needs an explicit source language (x-source-lang; auto cannot be used). If the glossary has no dictionary for the source and target pair, the response is 400 GLOSSARY_LANGUAGE_MISMATCH. Proofreading jobs (x-task: proofread) use the glossary as spellings to keep for that language.

Send one entry per line as TSV (source, tab, translation) or CSV (source,translation). Put true in a third column to keep the source spelling untranslated. A dictionary holds up to 10,000 entries, a term is up to 1,024 bytes, and each account can create up to 1,000 glossaries.

Glossaries themselves are free. Applied entries go into the translation input, so they are charged as input tokens.

Glossary endpoints
MethodPathDescription
GET/api/glossariesList glossaries (yours and those shared in your organization)
POST/api/glossariesCreate a glossary — name, optional dictionaries
GET/api/glossaries/{glossaryId}Glossary and its dictionaries
PATCH/api/glossaries/{glossaryId}Rename — name
DELETE/api/glossaries/{glossaryId}Delete the glossary (with its dictionaries)
GET/api/glossaries/{glossaryId}/dictionaries?source_lang=&target_lang=Dictionary entries — JSON, or format=tsv / format=csv
PUT/api/glossaries/{glossaryId}/dictionaries?source_lang=&target_lang=Replace a dictionary — TSV or CSV body (content-type: text/csv)
DELETE/api/glossaries/{glossaryId}/dictionaries?source_lang=&target_lang=Delete a dictionary
  • With an API key, reading needs translation:read; creating, changing and deleting need translation:submit.
curl
curl -X POST https://localization.md/api/glossaries \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "content-type: application/json" \
  -d '{"name": "Product terms", "dictionaries": [{"sourceLang": "en", "targetLang": "ko", "entries": "invoice\t청구서\nContoso\t\ttrue"}]}'
x-glossary-id
curl -X POST https://localization.md/api/translate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-source-lang: en" \
  -H "x-target-lang: ko" \
  -H "x-glossary-id: GLOSSARY_ID" \
  -F "file=@contract.docx"

6. Sentence translation

A sentence request sends short text without a file. It doesn't start an engine container, so only translation tokens are deducted, and each request has a minimum charge.

Short text is also submitted as a document file and processed with the flow in section 5.

6.1 Language detection

POST/api/translate/detect-language

Identifies the language of the body { "text": "…" } and returns lang (a code or null) and confidence (0–1). Use it to choose x-source-lang.

Detection is not charged. If the language can't be identified, the response is "ok": false with "lang": null — submit with x-source-lang: auto in that case.

7. Bulk processing

Submit large, non-urgent work with the x-processing: batch header. Bulk processing groups work and runs it asynchronously; it costs less, so it deducts less. There is no separate discount rate.

While waiting for bulk processing, the job status is batching. The batch object in the response holds the stage (stage) and the number of groups processed.

A request that can't use bulk processing (for example, translating with your own LLM key) is not rejected: it runs as an immediate job and the reason is recorded in batch.fallback.

x-processing: batch and x-exec-mode: sequential cannot be combined (400 PROCESSING_CONFLICT).

curl
curl -X POST https://localization.md/api/translate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-target-lang: ja" \
  -H "x-processing: batch" \
  -F "file=@manual.pdf"

8. Proofreading

Submit with x-task: proofread to correct spelling, grammar and style in the source language instead of translating. The result file has the same format as the original, and submitting, checking status and downloading work as in document translation.

A proofreading job sets the target language to the source language. If x-source-lang is omitted, the source language is identified automatically.

8.1 Proofreading changes

GET/api/jobs/{jobId}/proof-changes

Returns the list of changes made by a proofreading job. If the list can't be produced, the response is "available": false; downloading the proofread file still works.

curl
curl -X POST https://localization.md/api/translate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-task: proofread" \
  -F "file=@draft.docx"

9. Webhooks

Get notified by webhook instead of asking for the status after every job. Register a name, a destination URL and event types on the Webhooks screen in the app; every delivery is signed, and the delivery log (delivered · pending · failed) and attempt counts are shown.

Check a registered webhook with a test delivery, and deactivate it when it's no longer needed. Webhooks are managed by organization admins.

9.1 Event types

Webhook events
EventSent when
translation.job.readyA translation job completes
translation.job.failedA translation job fails
document.viewer.readyThe result document can be opened in the viewer
billing.invoice.createdAn invoice is created
support.ticket.updatedA support request is updated

9.2 Delivery format and signature

Webhooks send a JSON body with POST and include the following headers.

Webhook request headers
NameTypeRequiredDescription
x-vte-event-idstringAlways

Event ID. A redelivered event keeps the same value, so use it to avoid processing duplicates.

x-vte-event-typestringAlways

Event type (a value from 9.1).

x-vte-timestampstringAlways

Signing time (Unix seconds).

x-vte-signaturestringAlways

v1= followed by an HMAC-SHA256 signature (hex). The signed string is {timestamp}.{body} and the key is the secret you received when registering the webhook.

  • A failed delivery is attempted up to 3 times. Respond quickly with a 2xx and do heavy work afterwards.
Body
{
  "id": "EVENT_ID",
  "type": "translation.job.ready",
  "tenantId": "TENANT_ID",
  "createdAt": "2026-10-13T09:30:00.000Z",
  "data": {}
}
Signature check (Node.js)
import { createHmac, timingSafeEqual } from 'node:crypto';

// rawBody: the request body exactly as received (string)
export function verifyWebhook(rawBody, headers, secret) {
  const timestamp = headers['x-vte-timestamp'];
  const expected = 'v1=' + createHmac('sha256', secret)
    .update(`${timestamp}.${rawBody}`)
    .digest('hex');
  const given = String(headers['x-vte-signature'] || '');
  return given.length === expected.length &&
    timingSafeEqual(Buffer.from(given), Buffer.from(expected));
}

10. Usage and pricing

The API deducts credits on the same basis as the web, for the compute actually used. Individual developers use topped-up credits (1:1) without a subscription. Enterprise developers can buy credits at a discount with an annual commitment.

Document edit API calls (POST /api/jobs/{jobId}/edits) have a monthly free allowance of 200 calls per account, counted per UTC month. Each call beyond it is charged $0.001. The same count applies whether the call uses an API key or comes from applying an agent suggestion.

If the balance is below the minimum at submission, the response is 402 INSUFFICIENT_CREDITS, with the required amount and current balance in µUSD in required and available. When the job finishes, the final amount appears in the job's settlement.

Context (x-context) goes into the translation input, so it is charged as input tokens.

Full pricing is on Pricing.

10.1 Estimate

POST/api/translate/estimate

Roughly calculates the expected cost and duration per file before you submit. Estimates are not charged and never block a submission.

Request body (application/json)
NameTypeRequiredDescription
itemsarrayRequired

1–50 files. Each item is { "filename": string, "bytes": number }.

targetLangstringOptional

Target language code.

modelstringOptional

Model ID (same values as x-llm-model).

processingstringOptional

batch calculates with bulk processing rates.

curl
curl -X POST https://localization.md/api/translate/estimate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "content-type: application/json" \
  -d '{"items":[{"filename":"report.docx","bytes":482133}],"targetLang":"ko"}'
200 OK
{
  "ok": true,
  "currency": "USD",
  "confidence": "rough",
  "mode": "platform",
  "items": [
    {
      "index": 0,
      "format": "docx",
      "bytes": 482133,
      "costMicro": 180000,
      "display": "$0.18",
      "durationSec": { "min": 40, "max": 90 }
    }
  ]
}

10.2 Enterprise annual commitments

Enterprise annual commitment discounts
Annual commitmentDiscount
$10,00015%
$50,00025%
$200,00035%
  • The discount applies to the price of acquiring credits; credits are deducted on the same basis. Any unused part of the commitment expires.

10.3 Your own LLM key (BYOK)

Register an OpenAI-family or Anthropic key on the app's 'My LLM keys' screen and translation uses that key. Keys are stored encrypted on the server and can't be viewed again after registration. You don't need to include the key in API requests.

When you translate with BYOK, LLM costs are billed directly to your LLM account; the platform deducts only the other compute plus 5% of the metered token cost.

11. Error codes

Error responses return an HTTP status code with a body of the form { "ok": false, "code": "…" }. Message wording may change, so branch on code.

Every /api response carries a request ID header, x-request-id, and error bodies carry the same value as requestId. If you send a well-formed x-request-id (letters, digits, _ and -, up to 128 characters), it is used as is. Include this value when you contact support.

11.1 HTTP status and codes

Error codes
HTTPcodeMeaningWhat to do
400INVALID_LANGUAGE_CODEThe language code is malformed.Use a code from 5.7.
400INVALID_LANGUAGE_TYPEThe type value for the language list is not source or target.Use a value from 5.7.
400INVALID_MODEL_IDThe model ID is malformed.Use a value from GET /api/translate/models.
400EXEC_MODE_INVALID · PROCESSING_INVALID · TASK_INVALIDA header value is outside the allowed range.Use the values in 5.1.
400CONNECTOR_SOURCE_INVALID · FILE_REQUIREDThe storage file reference (connectorSource) is malformed or the file is empty.Check { connectorSource: { connectionId, path } } (a file dragged from the storage overlay).
400DOCUMENT_SOURCE_INVALIDThe document reference (documentSource) is malformed.Check { documentSource: { documentId, assetId? } } (a document ID from your document list).
400CONTEXT_INVALID · CONTEXT_TOO_LONGx-context is not base64url UTF-8, or it is longer than 2,000 characters (limit).Shorten the context and resend it as base64url.
400FORMALITY_INVALID · FORMALITY_UNSUPPORTEDThe x-formality value is out of range, or the target language does not support formality.Use a value from 5.1, or use prefer_more / prefer_less.
400PROCESSING_CONFLICTBulk processing and sequential execution were requested together.Send only one of them.
400MULTIPART_MALFORMED · UPLOAD_ABORTEDThe body has no file part, or the upload was cut off.Resend with a file part that carries a file name.
400GLOSSARY_SOURCE_LANG_REQUIRED · GLOSSARY_TARGET_LANG_REQUIRED · GLOSSARY_LANGUAGE_MISMATCHA glossary was named without a source or target language, or it has no dictionary for that pair.Send x-source-lang and x-target-lang, and create a dictionary for that pair.
400GLOSSARY_ENTRIES_INVALID · GLOSSARY_NAME_INVALID · GLOSSARY_LANGUAGE_INVALIDGlossary entries, name or language codes are malformed (line = entry line number).Resend in the format in 5.8.
400GLOSSARY_ID_INVALID · GLOSSARY_DICTIONARIES_INVALIDThe glossary ID is malformed, or the dictionary list sent on creation is invalid (a duplicate language pair or too many dictionaries).Resend in the format in 5.8.
400INVALID_REQUEST · INVALID_JSON · INVALID_USERThe request body or a query value is malformed (field = the offending item).Fix the request and resend it.
400PERIOD_INVALID · LIMIT_OUT_OF_RANGEThe period or count is outside the allowed range (from·to, min·max).Resend with a value inside the range given in the response.
400IDEMPOTENCY_KEY_INVALIDThe Idempotency-Key value is not 1–128 characters of letters, digits, ., _, : or -.Resend with a well-formed key.
404GLOSSARY_NOT_FOUND · GLOSSARY_DICTIONARY_NOT_FOUNDThe glossary or dictionary doesn't exist.Check the glossary ID and the language pair.
409GLOSSARY_LIMIT_REACHEDThe glossary count limit (limit) has been reached.Delete glossaries you no longer use, then create it again.
413GLOSSARY_TOO_LARGEThe dictionary has more entries than the limit (limit).Split the dictionary.
401UNAUTHENTICATEDCredentials are missing or invalid. API key requests carry a reason: KEY_INVALID (malformed or unknown key) · KEY_REVOKED (revoked key) · KEY_EXPIRED (expired key) · KEY_OWNER_INACTIVE (the key owner's account is inactive).Check the Authorization header and the key status.
402INSUFFICIENT_CREDITSThe balance is below the minimum (required, available).Top up credits and resubmit.
402SPEND_CAP_REACHEDThe API key has reached its monthly spend cap (capMicro, usedMicro, resetsAt). Jobs that are already running finish.Raise the cap on the API keys page, or resubmit after resetsAt.
403FORBIDDENThe job belongs to another user, or the key lacks permission. reason: SCOPE_DENIED (outside the key's scopes) · ROUTE_NOT_ALLOWED (a path that can't be called with an API key) · ORG_KEYS_DISABLED (organization keys not supported yet) · CONSENT_REQUIRED (copyright consent is needed before issuing a key).Check the job ID, the key's scopes and the path.
403PERMISSION_DENIED · TENANT_UNRESOLVEDYou don't have permission to change shared organization glossaries, or the account's organization could not be determined.Ask an organization admin for permission.
404JOB_NOT_FOUND · NO_OUTPUTThe job doesn't exist, or there is no result file to download.Check the job ID and status.
404NOT_FOUNDThe requested path or resource doesn't exist.Check the path and the ID.
404ASSET_UNAVAILABLEThe document file to translate (documentSource or estimate documentId) is missing.Check the document status or upload the original file again.
409NOT_READYThe result is not ready yet.Download after the status becomes ready.
409IDEMPOTENCY_IN_PROGRESSA request with the same Idempotency-Key is still being processed (retryAfterSeconds).Wait for Retry-After, then resend with the same key to get the job that was created.
410FILE_EXPIRED · RESULT_PURGEDThe document file was removed after its retention period, or by the delete-after-job setting.Upload the original file again and submit.
413PAYLOAD_TOO_LARGEThe upload exceeds the size limit (limit).Split the file and submit the parts.
422UPLOAD_INCOMPLETEThe received file is incomplete (receivedBytes). This happens when a file is uploaded while it is still being saved.Resubmit once the file has finished saving.
429RATE_LIMITEDToo many requests (retryAfterSeconds). API key responses carry X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers.Wait for Retry-After, then resend.
500GLOSSARY_STORE_ERRORThe glossary store returned an error.Try again shortly.
502TRANSLATION_UNAVAILABLEThe translation service could not be reached temporarily.Try again shortly.
502COWORK_SOURCE_FAILEDThe file could not be read from the connected storage.Try again shortly or check the storage connection.
502DOCUMENT_SOURCE_FAILEDThe document file could not be read.Try again shortly.
502BILLING_UNAVAILABLE · ESTIMATE_UNAVAILABLE · LANGUAGES_UPSTREAM_ERROR · LANGUAGES_UPSTREAM_INVALID · LANGUAGES_UPSTREAM_UNAVAILABLEThe balance, estimate or language list service could not be reached temporarily.Try again shortly.
503GLOSSARY_UNAVAILABLE · AUTH_UNAVAILABLEGlossaries can't be applied, or API keys can't be checked, for the moment (the reason for AUTH_UNAVAILABLE is AUTH_BACKEND_UNAVAILABLE).Try again shortly. This is not a key problem, so there is no need to change the key.
400 · 502GLOSSARY_STAGE_FAILEDThe glossary could not be prepared for the job.Check the glossary entries, then resubmit.
4xx · 5xxSUBMIT_FAILED · OUTPUT_NOT_FOUND · PROOF_CHANGES_FAILEDThe translation service rejected the request without a code (its HTTP status is passed through).For 5xx, try again shortly; for 4xx, check the request and the job status.
409EDIT_CONFLICTA document edit (POST /api/jobs/{jobId}/edits) was sent with an expected version that no longer matches; current has the latest patchCount and editedAt.Re-read the document and resend with the new expected.

11.2 Job failures

Problems that occur during processing after a submission is accepted (for example, an unsupported format) are reported as job status failed, not as HTTP errors. The reason is in the job's failCode and failSummary.

12. Limits and retries

Limits

  • Uploads have a size limit. Exceeding it returns 413 PAYLOAD_TOO_LARGE with the allowed number of bytes (limit).
  • Each API key has a monthly spend cap and a rate limit. Exceeding the rate limit returns 429 RATE_LIMITED with a Retry-After header.
  • An estimate request accepts up to 50 files at a time.

Retries

  • 429 and 5xx responses (e.g. 502 TRANSLATION_UNAVAILABLE) are safe to retry. Wait for Retry-After when present; otherwise wait with growing intervals (exponential backoff).
  • Other 4xx responses repeat until the request is fixed. For 422 UPLOAD_INCOMPLETE, resubmit once after the file has finished saving.
  • Each submission creates a new job and is charged separately. If you didn't receive a response, check whether a job was already created before submitting again.

Recommendations

  • Use API keys only on your server; never put them in browser code or URLs.
  • Don't poll the status at short intervals — use the progress stream or webhooks. If you do poll, lengthen the interval over time.
  • Before sending a large batch, check the cost with an estimate and make sure the balance covers it.

12.1 Example: wait for completion

JavaScript
const BASE = 'https://localization.md';
const headers = { Authorization: 'Bearer YOUR_API_KEY' };
const DONE = ['ready', 'failed', 'cancelled', 'needs_decrypt'];
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));

export async function waitForJob(jobId) {
  let delay = 2000;
  for (;;) {
    const res = await fetch(`${BASE}/api/jobs/${jobId}`, { headers });
    if (res.ok) {
      const job = await res.json();
      if (DONE.includes(job.status)) return job;
    } else if (res.status !== 429 && res.status < 500) {
      throw new Error(`HTTP ${res.status}`);
    }
    const retryAfter = Number(res.headers.get('retry-after'));
    await sleep(retryAfter > 0 ? retryAfter * 1000 : delay);
    delay = Math.min(delay * 2, 30000);
  }
}
Python
import time
import requests

BASE = "https://localization.md"
HEADERS = {"Authorization": "Bearer YOUR_API_KEY"}
DONE = {"ready", "failed", "cancelled", "needs_decrypt"}

def wait_for_job(job_id):
    delay = 2
    while True:
        res = requests.get(f"{BASE}/api/jobs/{job_id}", headers=HEADERS)
        if res.ok and res.json()["status"] in DONE:
            return res.json()
        if not res.ok and res.status_code != 429 and res.status_code < 500:
            res.raise_for_status()
        retry_after = int(res.headers.get("Retry-After", 0) or 0)
        time.sleep(retry_after or delay)
        delay = min(delay * 2, 30)

13. Integrations

The Power Automate custom connector wraps the same API and offers three actions: translate a file (TranslateFile), get job status (GetJob) and download the result (DownloadResult). It authenticates with the OAuth 2.0 flow in 3.3.

Add the connector to a flow to translate files posted to a Teams channel or a SharePoint document library and put the translations back. Setup details are on Integrations.

To connect the API from other tools, import the OpenAPI 3.1 definition openapi.yaml.

14. Changelog

API changelog
DateChange
2026-10-13Published the first edition of this API documentation.
2026-10-13Added proofreading jobs (x-task: proofread) and the proofreading changes list (GET /api/jobs/{jobId}/proof-changes).
2026-10-13Added bulk processing (x-processing: batch) and the batching job status.
2026-10-11Added execution mode selection (x-exec-mode).
2026-10-11Added 422 UPLOAD_INCOMPLETE, which catches incomplete uploads before a job is created.

Sign in to create an API key

Get started