Skip to main content
POST
Translate up to 500 characters and receive the complete translation in a single JSON response. It does not create an order or save a translation deliverable.
No Ollang credits are charged during the temporary preview. A valid Ollang API key is required. This offer applies only to this endpoint and is not a permanent pricing commitment.

Authentication

Send your Ollang API key in the X-Api-Key header. In the interactive playground, enter it once under Authorization; the header is added automatically. Keep the key on your server, not in public browser code.

Request body

Send Content-Type: application/json.
string
required
Source text, from 1 to 500 characters. Empty or whitespace-only text is rejected. Longer input is rejected, not truncated.
string
required
Target language. Use a BCP-47 language tag such as tr, pt-BR, or zh-Hant to specify the language and, optionally, its region or script. Must contain non-whitespace text and be 1 to 80 characters long.
string
Optional source language. Use a BCP-47 language tag such as en or en-GB. Omit it to detect the source language automatically. When supplied as a string, it must contain non-whitespace text and be 1 to 80 characters long.
BCP-47 tags are accepted for both fields; see language codes and BCP-47 support. Language names such as English and Turkish are also accepted, but tags are recommended for consistent integrations. These fields are not restricted to a fixed language list, and the API does not enforce BCP-47 syntax. Acceptance of a tag does not guarantee translation quality for every language, region, or script.
string
Optional translation guidance, such as the subject, audience, preferred terminology, or tone. When supplied, it must contain non-whitespace text and be 1 to 500 characters long. This limit is separate from the 500-character limit on text. Omit it when no guidance is needed.
Only text is translated. context guides the translation; it is not additional source text and does not change the response format. For example, use "context": "A casual greeting between friends; use an informal tone.". Extra request fields are rejected. Set OLLANG_API_KEY securely in your environment before running the cURL example.

Response

A successful response has HTTP status 200 and content type application/json. The request waits for the complete translation; no streaming or event parsing is needed.
string
The complete translated text. Formatting and line breaks are preserved where possible.
Read translatedText directly from the response. Output quality and formatting are not guaranteed; validate the translation before using it in a production workflow.

Preview limits and errors

The preview has shared capacity limits. If you receive 429, wait before retrying and reduce concurrent requests. A disconnect cancels the request. Failed or timed-out requests return an error instead of a partial translation. Existing account access restrictions still apply during the no-credit-charge preview.