Skip to main content
POST
/
v1
/
translate
Translate Text
curl --request POST \
  --url https://api.spi-tch.com/v1/translate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "source": "yo",
  "target": "yo",
  "text": "<string>",
  "model": "auto",
  "file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "instructions": "<string>"
}'
{
  "request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "text": "<string>",
  "due_date": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Translation task model.

Defines parameters for text translation between languages, including source/target languages, model selection, and optional custom instructions.

source
enum<string>
required
Available options:
yo,
en,
ha,
ig,
am
target
enum<string>
required
Available options:
yo,
en,
ha,
ig,
am
text
string | null
default:""
model
enum<string>
default:auto
Available options:
human,
auto
file_id
string<uuid> | null
instructions
string | null

Response

Translation completed successfully. Returns the translated text with optional delivery information for human translations.

Translation result model.

Attributes: request_id (UUID): Unique ID for this request. text: translated text. due_date: used when model is human. the date you can expect the translation to be delivered

request_id
string<uuid>
required
text
string
required
due_date
string<date-time> | null
I