---
title: "Synchronously translate a plain text (no file, no job, no streaming)"
method: POST
path: "/plain-text"
---

# Synchronously translate a plain text (no file, no job, no streaming)

`POST /plain-text`

## Request

- Base URL: `/api/translation` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/translation/plain-text`
- Auth: none declared
- TypeScript: <https://skmtc.dev/cdc/apis/zia-translation-service/docs/plain-text/post.ts> (a function with typed inputs; its response is checked against the schema)

## Request body

- PlainTextTranslationRequest
  - `text` string, required: Source plain text to translate
  - `targetLanguage` string: 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.

## Response `200`

Translated text

- PlainTextTranslationResponse
  - `translatedText` string, required: The translated plain text

## Other responses

- `400`: Bad request — missing/unreadable body, missing or empty `text`, or `text` too long
- `415`: Unsupported Content-Type (must be `application/json`)
- `422`: Translation failed on the LLM side

## Changes

- **2026-10-16** `400b337d9a2e`: 1 info
  - the request property `targetLanguage` became optional
- **2026-10-07** `6a7bd2cf5ad1`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/cdc/apis/zia-translation-service/changes/plain-text/post.md)

---

[API](https://skmtc.dev/cdc/apis/zia-translation-service.md) - [All operations](https://skmtc.dev/cdc/apis/zia-translation-service/llms.txt) - [OpenAPI document](https://skmtc.dev/cdc/apis/zia-translation-service/revisions/17816f6177b4?raw)
