Loading...
Loading...
Loading...
We use essential storage to operate Lexel Translate. With your permission, we also use analytics, advertising, and marketing technologies. Read our Cookie Policy.
Loading...
Queue translation work for background processing. Poll status, fetch results, cancel queued work, or receive completion callbacks.
/api/v1/translate/asyncCreate an async translation job.
/api/v1/translate/async/:jobIdRead job status and callback state.
/api/v1/translate/async/:jobId/resultFetch the final logical translation result.
/api/v1/translate/async/:jobId/cancelCancel a queued job.
Create job example
/api/v1/translate/asynccurl -X POST "https://translate.lexel.ai/api/v1/translate/async" \-H "Authorization: Bearer lxl_your_api_key" \-H "Content-Type: application/json" \-d '{"job": {"webhookProfileId": "whp_123","resultTtlSeconds": 86400},"request": {"request_id": "req_job_demo_001","content_mode": "plain","input": {"items": [{"id": "item_1","txt": "Hello world","src": "en-Latn","tgt": "es-Latn"},{"id": "item_2","txt": "Where is {name}?","src": "en-Latn","tgt": "fr-Latn","do_not_translate": ["{name}"]}]}}}'
Create response example
{"ok": true,"jobId": "job_123","status": "queued","createdAt": "2026-06-25T18:00:00.000Z","resultExpiresAt": "2026-06-26T18:00:00.000Z","statusUrl": "/api/v1/translate/async/job_123","resultUrl": "/api/v1/translate/async/job_123/result","cancelUrl": "/api/v1/translate/async/job_123/cancel","summary": {"mode": "batch","totalItems": 2,"totalInputCharacters": 31},"callback": {"callbackUrl": null,"webhookProfileId": "whp_123"}}
| Field | Type | Required | Description |
|---|---|---|---|
| job.callbackUrl | https URL | No | One-off HTTPS callback URL. Mutually exclusive with webhookProfileId. |
| job.webhookProfileId | string | No | Managed webhook profile ID to use for completion delivery. |
| job.resultTtlSeconds | number | No | Requested result retention window in seconds. Defaults to 86400 (24 hours); values above 604800 (7 days) are rejected with 400. |
| request.request_id | string | Yes | Caller trace ID for the logical translation request. |
| request.input.items | array | Yes | The logical translation payload. Single and batch are both accepted inside request. |
| request.input.items[].id | string | No | Optional for single; recommended for batch; used for child execution tracking. |
| request.input.items[].txt | string | Yes | Text to translate. |
| request.input.items[].src | language tag | "" | No | Per-item source language or auto-detect. |
| request.input.items[].tgt | language tag | No | Per-item target language. Can also inherit from root request.tgt. |
| Field | Type | Required | Description |
|---|---|---|---|
| jobId | string | Yes | Async translation job ID. |
| status | queued | running | completed | completed_with_errors | failed | canceled | Yes | Current aggregated parent job state. |
| createdAt / startedAt / completedAt / canceledAt | ISO string | null | No | Lifecycle timestamps. |
| resultExpiresAt | ISO string | null | No | When stored result retrieval expires. |
| error | string | null | No | Terminal failure reason when status is failed. |
| summary | object | No | Logical item counts and aggregated queued/running/completed/failed counters. |
| callback.configured | boolean | No | Whether callback delivery is configured. |
| callback.webhookProfileId | string | null | No | Resolved managed profile ID, if any. |
| callback.deliveredAt | ISO string | null | No | Last successful callback delivery time. |
| callback.deliveryFailed | boolean | No | Whether the last callback delivery attempt failed. The failure detail is not returned. |
| callback.attempts | number | No | Delivery attempts made. |
Status example
/api/v1/translate/async/:jobIdcurl -X GET "https://translate.lexel.ai/api/v1/translate/async/job_123" \-H "Authorization: Bearer lxl_your_api_key"
{"ok": true,"jobId": "job_123","status": "running","createdAt": "2026-06-25T18:00:00.000Z","startedAt": "2026-06-25T18:00:05.000Z","completedAt": null,"canceledAt": null,"resultExpiresAt": "2026-06-26T18:00:00.000Z","error": null,"summary": {"mode": "batch","totalItems": 2,"queuedItems": 0,"runningItems": 1,"completedItems": 1,"failedItems": 0,"canceledItems": 0},"callback": {"configured": true,"webhookProfileId": "whp_123","deliveredAt": null,"deliveryFailed": false,"attempts": 0}}
Result example
/api/v1/translate/async/:jobId/resultcurl -X GET "https://translate.lexel.ai/api/v1/translate/async/job_123/result" \-H "Authorization: Bearer lxl_your_api_key"
Cancel example
/api/v1/translate/async/:jobId/cancelcurl -X POST "https://translate.lexel.ai/api/v1/translate/async/job_123/cancel" \-H "Authorization: Bearer lxl_your_api_key"