Translate plain text from one language to another. Supports 250+ languages with automatic source language detection. Ideal for translating user-generated content, messages, and short text passages.
HTTP Request
| |
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
source | string | No | "auto" | Source language code (e.g., en, fr, de). Use auto for automatic detection |
target | string | Yes | — | Target language code (e.g., es, ja, zh) |
Request Body
Send the text to translate as the raw request body with Content-Type: text/plain. Maximum length is 5000 characters.
| |
Response
| |
Response Fields
| Field | Type | Description |
|---|---|---|
status | boolean | Whether the request was successful |
data.translated_text | string | The translated text |
data.source_language | string | Detected or specified source language code |
data.source_language_name | string | Human-readable name of the source language |
Code Examples
| |
| |
| |
Related Endpoints
- Detect Language — Detect the language of a text without translating
- Batch Translate — Translate multiple strings in a single request
- Translate HTML — Translate HTML content while preserving markup