Skip to main content
Direct text processing endpoints allow you to translate, revise, and rewrite text synchronously without creating background jobs. These endpoints return results immediately, making them ideal for real-time applications. Streaming variants are available for translate and rewrite, delivering results via Server-Sent Events.

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

array of strings
required
List of texts to translate.
string
required
The source language code (e.g., “en”).
string
required
The target language code (e.g., “de”).

Optional attributes

string
Content domain for the translation (e.g., “technical”, “legal”, “marketing”).
string
The AI provider to use: openai, anthropic, mistral, gemini, lara, widn (default: openai).
integer
Processing mode (1=full_document, 2=bucketing, 3=segment_per_segment, default: 3).
array of integers
List of glossary IDs to use for terminology consistency.
array of integers
Context store IDs for styleguide content.
string
Additional instructions for the translation.
array of strings
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

array of strings
required
List of texts to translate. The stream translates the first item.
string
required
The source language code (e.g., “en”).
string
required
The target language code (e.g., “de”).

Optional attributes

string
Content domain for the translation (e.g., “technical”, “legal”, “marketing”).
string
The AI provider to use: openai, anthropic, mistral, gemini, lara, widn (default: openai).
integer
Processing mode (1=full_document, 2=bucketing, 3=segment_per_segment, default: 3).
array of integers
List of glossary IDs to use for terminology consistency.
array of integers
Context store IDs for styleguide content.
string
Additional instructions for the translation.
array of strings
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

string
required
The original source text.
string
required
The existing translation to revise.
string
required
The source language code (e.g., “en”).
string
required
The target language code (e.g., “de”).

Optional attributes

string
Content domain for the revision (e.g., “technical”, “legal”, “marketing”).
string
The AI provider to use: openai, anthropic, mistral, gemini (default: openai).
integer
Processing mode (1=full_document, 2=bucketing, 3=segment_per_segment, default: 3).
array of integers
List of glossary IDs to use for terminology consistency.
array of integers
Context store IDs for styleguide content.
string
Additional instructions for the revision.
string
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

string
required
The text to rewrite.
string
required
The language code of the text (e.g., “en”).
string
required
The rewrite type. One of: simplify, summarize, elaborate, continue, align.

Optional attributes

string
Content domain for the rewrite (e.g., “technical”, “legal”, “marketing”).
array of integers
List of glossary IDs to use for terminology consistency.
array of integers
Context store IDs for styleguide content.
string
Additional rewriting instructions.
integer
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

string
required
The text to rewrite.
string
required
The language code of the text (e.g., “en”).
string
required
The rewrite type. One of: simplify, summarize, elaborate, continue, align.

Optional attributes

string
Content domain for the rewrite (e.g., “technical”, “legal”, “marketing”).
array of integers
List of glossary IDs to use for terminology consistency.
array of integers
Context store IDs for styleguide content.
string
Additional rewriting instructions.
integer
Explicit prompt template ID override.
Response (SSE)