Skip to main content
POST
Create Translation Stream (Deprecated)
This endpoint is deprecated. For new integrations, use the standard translation task flow with POST /translation, then poll task status and fetch the completed result.
This endpoint provides instantaneous text translation with adaptive context handling, streaming results character-by-character as they’re processed. This approach enables real-time subtitling, live chat translation, and dynamic content localization without waiting for full document processing.

Customizing Your translation

Contextual Adaptation Parameters

Enhance your translations with linguistic context controls:
  • Formality Level (Optional):
  • Grammatical Gender (Optional): Applies to languages with gender-specific grammar

Language Support

Implementation Guide

Streaming Translation Workflow:
When to use synchronous vs asynchronous:
  • Use synchronous (requests) for:
    • Simple scripts
    • Low-concurrency applications
    • Quick prototyping
  • Use asynchronous (aiohttp) for:
    • High-performance applications
    • Parallel translation streams
    • Web servers with async frameworks

Response Handling

  • Stream Format: UTF-8 encoded text/event-stream with incremental translations.
  • Credit Tracking: X-Credits-Required header shows computational resources used.
  • Error Handling: Failed streams immediately terminate with error message.

Use Case Examples

  • Live Caption Translation: Convert spoken language subtitles in real-time
  • Chat Localization: Instant message translation for multilingual support teams
  • Document Preview: Stream translated content while full processing continues
This streaming solution is ideal for applications requiring immediate partial results while maintaining full translation context awareness. The character-level streaming allows for dynamic UI updates and progressive content rendering.

Authorizations

x-api-key
string
header
required

The x-api-key is a custom header required for authenticating requests to our API. Include this header in your request with the appropriate API key value to securely access our endpoints. You can find your API key(s) in the 'API' section of our studio website.

Body

application/json
text
string
required
source_language
string
required

The language of the input text. Pass a locale tag (en-us, fr-fr, es-es). Numeric language IDs (1 or "1") still work but are deprecated. See all source languages.

Example:

"en-us"

target_language
string
required

The target output language. Pass a locale tag (fr-fr, es-es, de-de). Numeric language IDs still work but are deprecated. See all target languages.

Example:

"fr-fr"

formality
enum<integer> | null
default:2
Available options:
1,
2
gender
enum<integer> | null
default:1

The gender of the speaker.

Available options:
0,
1,
2,
9

Response

Text translation stream

The response is of type string.

Last modified on May 25, 2026