Skip to main content
POST
Translate a first message

Authorizations

better-auth.session_token
string
cookie
required

Session cookie set by auth.api.signInEmail (or the OAuth flow). Forwarded automatically by the browser; copy via document.cookie for server-to-server calls during development.

Body

application/json
text
string
required

The default first message to translate. {{variables}} are kept as written.

Maximum string length: 2000
Example:

"Hello {{name}}! How can I help you today?"

source_language
string
required

Language code the text is written in; "multi" detects it from the text.

Example:

"en"

target_languages
string[]
required

Language codes to translate into.

Example:

Response

200 - application/json
translations
object
required

Language code → translated first message, one per target.

Example: