Understanding Translation

Translation

Translate text between languages with LLM-powered translation and real-time streaming output. Send text in any language, name a target language, and read the translation as it's generated over Server-Sent Events.

1

What you get

Translation streams its response through Server-Sent Events (SSE), so you receive translated text while it is still being generated rather than waiting for the full result.

IncludedTypical use case
Real-time translation between languagesLive chat and customer support translation
Streaming output as content is generatedReal-time subtitles and multilingual captions
Source language auto-detectionCross-language workflows in apps and internal tools
Flexible model and prompt configurationTuning translation behavior per product surface

The flow is three steps: send the source text and target language, receive streaming chunks while the translation is generated, then wait for the complete event to get the final translation.

2

Endpoint

POST /api/v1/translation/stream

Unlike most Munsit endpoints, this one authenticates with either an API key or a JWT token in the Authorization: Bearer header.

FieldTypeRequiredDescription
textstringYesInput text to translate.
target_languagestringYesFull target language name, such as Arabic.
source_languagestringNoSource language, or string for auto-detection.
model_namestringNoTranslation model, default qwen/qwen3-32b.
prompt_namestringNoPrompt template, default quick-translate.
prompt_versionstringNoPrompt version, default 1.2.0.
3

Translate with streaming

Keep the connection open and read events until complete arrives.

curl
curl -N -X POST "https://api.munsit.com/api/v1/translation/stream" \ -H "Authorization: Bearer YOUR_MUNSIT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "text": "Welcome to Munsit", "target_language": "Arabic" }'
4

Stream events

Four event types arrive over the SSE connection, in order.

EventWhat it carries
session_infoRequest and session metadata.
startTranslation start, with the detected source language.
chunkPartial translation content — append as it arrives.
completeFinal translation output and metadata.
Keep the connection open. The response is streamed as Server-Sent Events — don't close until you've received a complete event, or you'll miss the final translation output.
5

Go further

Translation slots into any transcript pipeline.

Working with an AI assistant? Every page is available as Markdown: add .md to the URL, or send an Accept: text/markdown header. For the whole documentation in one request, point it at llms-full.txt; the page index is llms.txt. Or use Copy Page, top right.