Translate a PDF document and stream translated pages as SSE

Changed on
post/text

Request

Request body multipart/form-data

filestring binary

Source PDF document

targetLanguagestring

Target language. Supported languages: French (fr), German (de), Italian (it) and English (en). ISO 639-1/639-2 codes, regional variants (e.g. de-CH) and common language names in fr/de/it/en (e.g. Deutsch, allemand, German) are accepted, case- and accent-insensitive. If omitted, blank or unsupported, the default language (zia.translation.default-language, env ZIA_TRANSLATION_DEFAULT_LANGUAGE) is used. Generated PDFs include an AI-translation disclaimer footer in the resolved language.

strategy'single' | 'dual'

Translation strategy to use for this request. If omitted, the global configuration (zia.translation.strategy) is used as a fallback.

Example request

{
  "targetLanguage": "fr"
}

Response

Server-Sent Events stream. Emits page events with TranslationPageEvent payload, then a complete event with TranslationCompleteEvent payload. Emits error with a message payload if processing fails mid-stream.

Changes