Translate text
POST /v1/text/translate
This endpoint allows you to translate text directly using AI. It accepts a list of source texts and returns a corresponding list of translations.
Required attributes
List of texts to translate.
The source language code (e.g., “en”).
The target language code (e.g., “de”).
Optional attributes
Content domain for the translation (e.g., “technical”, “legal”, “marketing”).
The AI provider to use:
openai, anthropic, mistral, gemini, lara, widn (default: openai).Processing mode (1=full_document, 2=bucketing, 3=segment_per_segment, default: 3).
List of glossary IDs to use for terminology consistency.
Context store IDs for styleguide content.
Additional instructions for the translation.
Additional instructions passed to the translation provider.
Response
Stream translate text
POST /v1/text/translate/stream
This endpoint streams translated text via Server-Sent Events. It accepts the same request body as the synchronous translate endpoint but streams the translation of the first text in the source_text list.
The stream emits three event types:
- delta — A chunk of translated text:
{"text": "..."} - done — The final result with metadata:
{"text": "...", "source_language": "...", ...} - error — An error occurred:
{"error": "...", "status": 402|400|500}
Required attributes
List of texts to translate. The stream translates the first item.
The source language code (e.g., “en”).
The target language code (e.g., “de”).
Optional attributes
Content domain for the translation (e.g., “technical”, “legal”, “marketing”).
The AI provider to use:
openai, anthropic, mistral, gemini, lara, widn (default: openai).Processing mode (1=full_document, 2=bucketing, 3=segment_per_segment, default: 3).
List of glossary IDs to use for terminology consistency.
Context store IDs for styleguide content.
Additional instructions for the translation.
Additional instructions passed to the translation provider.
Response (SSE)
Revise text
POST /v1/text/revise
This endpoint allows you to revise translated text directly using AI post-editing. It provides synchronous text revision without TMS integration, using the same post-editing adapters and processing logic as the AIPE handler.
Required attributes
The original source text.
The existing translation to revise.
The source language code (e.g., “en”).
The target language code (e.g., “de”).
Optional attributes
Content domain for the revision (e.g., “technical”, “legal”, “marketing”).
The AI provider to use:
openai, anthropic, mistral, gemini (default: openai).Processing mode (1=full_document, 2=bucketing, 3=segment_per_segment, default: 3).
List of glossary IDs to use for terminology consistency.
Context store IDs for styleguide content.
Additional instructions for the revision.
Direct styleguide text to follow for the revision. Used if
context_stores is not provided.Response
Rewrite text
POST /v1/text/rewrite
This endpoint allows you to rewrite text using AI. You specify a rewrite type to control how the text is transformed — for example, simplifying complex language, summarizing long passages, or elaborating on brief content.
Required attributes
The text to rewrite.
The language code of the text (e.g., “en”).
The rewrite type. One of:
simplify, summarize, elaborate, continue, align.Optional attributes
Content domain for the rewrite (e.g., “technical”, “legal”, “marketing”).
List of glossary IDs to use for terminology consistency.
Context store IDs for styleguide content.
Additional rewriting instructions.
Explicit prompt template ID override.
Response
Stream rewrite text
POST /v1/text/rewrite/stream
This endpoint streams rewritten text via Server-Sent Events. It accepts the same request body as the synchronous rewrite endpoint but delivers results incrementally as they are generated.
The stream emits three event types:
- delta — A chunk of rewritten text:
{"text": "..."} - done — The final result with metadata:
{"text": "...", "source_language": "...", ...} - error — An error occurred:
{"error": "...", "status": 402|400|500}
Required attributes
The text to rewrite.
The language code of the text (e.g., “en”).
The rewrite type. One of:
simplify, summarize, elaborate, continue, align.Optional attributes
Content domain for the rewrite (e.g., “technical”, “legal”, “marketing”).
List of glossary IDs to use for terminology consistency.
Context store IDs for styleguide content.
Additional rewriting instructions.
Explicit prompt template ID override.
Response (SSE)