Translate text between languages using Google Cloud Translation API. Supports 100+ languages, automatic language detection, HTML preservation, and batch translation.
curl --request POST \
--url https://api.case.dev/translate/v1/translate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"q": "<string>",
"target": "es",
"source": "en",
"format": "text",
"model": "nmt"
}
'{
"data": {
"translations": [
{
"translatedText": "<string>",
"detectedSourceLanguage": "<string>",
"model": "<string>"
}
]
}
}API key starting with sk_case_
Text to translate. Can be a single string or an array for batch translation.
Target language code (ISO 639-1)
"es"
Source language code (ISO 639-1). If not specified, language is auto-detected.
"en"
Format of the source text. Use 'html' to preserve HTML tags.
text, html Translation model. 'nmt' (Neural Machine Translation) is recommended for quality.
nmt, base Translation successful
Show child attributes
Was this page helpful?
curl --request POST \
--url https://api.case.dev/translate/v1/translate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"q": "<string>",
"target": "es",
"source": "en",
"format": "text",
"model": "nmt"
}
'{
"data": {
"translations": [
{
"translatedText": "<string>",
"detectedSourceLanguage": "<string>",
"model": "<string>"
}
]
}
}