Translate Text
translateRead-onlyIdempotent
Translate up to 200 text segments in a single call - the same result that would otherwise take 200 separate calls to translate a whole file. Markdown, HTML and {x} placeholders preserved per segment, order and count kept intact, source language auto-detected, automatic fallback across multiple models for uptime, providers that train on submitted prompts excluded. A single string also works. No account, no API key. Try GET /translate/sample.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Text to translate - a single string, or an array of up to 200 segments to translate together in one call (batch/bulk translation), preserving order and count. | |
| source_lang | No | Source language code. Omit to auto-detect. | |
| target_lang | Yes | Target language as an ISO 639-1 code, e.g. 'en', 'fr', 'ja'. | |
| preserve_format | No | Keep markdown syntax, HTML tags and {x}/{{x}} placeholders unchanged, translating only the surrounding natural-language text - useful for localizing UI strings or templated content. |
Output Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | The original input text or segments. | |
| target_lang | Yes | ||
| model_served | No | Neutral model tag for this call (also present on x402_receipt.model_served). | |
| x402_receipt | No | Billing and provenance receipt, including segments_processed for batch calls. | |
| translated_text | Yes | Translated text - a string, or an array aligned with the input segments for batch requests. | |
| detected_source_lang | No | Auto-detected source language, when not supplied. |