Skip to main content
POST
/
v1
/
translate
Translate text
curl --request POST \
  --url https://api.spitch.app/v1/translate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "target": "<string>"
}
'
{
  "request_id": "<string>",
  "text": "<string>"
}

Authorizations

Authorization
string
header
required

Authenticate with Authorization: Bearer <token>. The service accepts JWTs, API keys, and guest tokens through this bearer token header.

Body

application/json

JSON translation request. Provide text and the target language.

The request must include text or file_id; meaningful translation currently requires text.

target
string
required

Required ISO 639 target language code.

source
string

Optional ISO 639 source language code. Auto-detected from text if omitted.

text
string
default:""

Text to translate. This is the content used by the current implementation.

file_id
string<uuid>

Accepted by validation, but this endpoint does not currently read file content.

instructions
string

Accepted by validation, but not passed to the current translation call.

tone
enum<string>
default:neutral

Tone passed to the translation prompt.

Available options:
neutral,
warm,
professional,
narration
formality
enum<string>
default:casual

Formality passed to the translation prompt.

Available options:
casual,
formal

Response

Successful Response

request_id
string
required
text
string
required