Skip to main content
POST
/
translate
/
v1
/
translate
Translate text
curl --request POST \
  --url https://api.case.dev/translate/v1/translate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "q": "The plaintiff filed a motion for summary judgment.",
  "target": "es"
}
'
{
  "data": {
    "translations": [
      {
        "translatedText": "El demandante presentó una moción de juicio sumario.",
        "detectedSourceLanguage": "en"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

API key starting with sk_case_

Body

application/json
q
required

Text to translate. Can be a single string or an array for batch translation.

target
string
required

Target language code (ISO 639-1)

Example:

"es"

source
string

Source language code (ISO 639-1). If not specified, language is auto-detected.

Example:

"en"

format
enum<string>
default:text

Format of the source text. Use 'html' to preserve HTML tags.

Available options:
text,
html
model
enum<string>
default:nmt

Translation model. 'nmt' (Neural Machine Translation) is recommended.

Available options:
nmt,
base

Response

Translation successful

data
object