Skip to main content
POST
Translate text

Authorizations

Authorization
string
header
required

Bearer token authentication. Supports two token types:

  • JWT Access Token — obtained via POST /v1/auth/login
  • Personal Access Token (PAT) — created via POST /v1/api-tokens, format: cmnd_<tokenId>.<secret>

Body

application/json
text
string
required

Text to translate.

Example:

"Hello, world."

target_lang
string
required

Target language, ISO 639-1.

Example:

"de"

source_lang
string

Optional source language, ISO 639-1. Omit to auto-detect.

Example:

"en"

Response

Successful translation

translated_text
string
Example:

"Hallo, Welt."

detected_source_lang
string

Present when source_lang was omitted and the backend detected the language.

Example:

"en"

target_lang
string
Example:

"de"