Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.case.dev/llms.txt

Use this file to discover all available pages before exploring further.

Translate text to any of 100+ supported languages using neural machine translation.
Endpoint
POST /translate/v1/translate
curl -X POST https://api.case.dev/translate/v1/translate \
  -H "Authorization: Bearer sk_case_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "q": "The plaintiff filed a motion for summary judgment.",
    "target": "es"
  }'
Response
{
  "data": {
    "translations": [
      {
        "translatedText": "El demandante presentó una moción de juicio sumario.",
        "detectedSourceLanguage": "en"
      }
    ]
  }
}

Parameters

Required

ParameterTypeDescription
qstring or string[]Text to translate. Can be a single string or array for batch translation.
targetstringTarget language code (ISO 639-1), e.g., es, fr, de, zh

Optional

ParameterTypeDefaultDescription
sourcestringauto-detectSource language code. If omitted, language is automatically detected.
formatstringtextFormat of source text: text or html
modelstringnmtTranslation model: nmt (neural) or base

Batch translation

Translate multiple strings in a single request:
casedev translate:v1 translate \
  --q "The deposition will be held on Monday." \
  --target es

HTML preservation

Preserve HTML tags during translation with format: 'html':
curl -X POST https://api.case.dev/translate/v1/translate \
  -H "Authorization: Bearer sk_case_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "q": "<p>The <strong>defendant</strong> denies all allegations.</p>",
    "target": "de",
    "format": "html"
  }'

Common language codes

LanguageCode
Englishen
Spanishes
Frenchfr
Germande
Chinese (Simplified)zh
Chinese (Traditional)zh-TW
Japaneseja
Koreanko
Arabicar
Portuguesept
Russianru
Italianit
See the Supported Languages endpoint for a complete list.

Examples

casedev translate:v1 translate \
  --q "NOTICE OF MOTION - PLEASE TAKE NOTICE that the undersigned..." \
  --target es

Auto-detect source language

casedev translate:v1 translate \
  --q "Bonjour, comment puis-je vous aider?" \
  --target en
Pricing: $0.05 per 1,000 characters. A 50,000 character document costs $2.50.