> ## Documentation Index
> Fetch the complete documentation index at: https://docs.co-mind.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 8. Translation

> Translate text between languages using ISO 639-1 codes, with optional source-language detection.

Single-shot text translation. Language codes follow ISO 639-1 (e.g. `en`, `de`, `fr`). Omit `source_lang` and the platform detects it.

## Translate text

```bash theme={null}
curl -X POST {BASE_URL}/v1/translate/text \
  -H "Authorization: Bearer $PAT" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "The quarterly report is ready for review.",
    "source_lang": "en",
    "target_lang": "de"
  }'
```

```json theme={null}
{
  "translated_text": "Der Quartalsbericht ist zur Prüfung bereit.",
  "source_lang": "en",
  "target_lang": "de"
}
```

## Detect the source language

Skip `source_lang` and let the platform figure it out:

```bash theme={null}
curl -X POST {BASE_URL}/v1/translate/text \
  -H "Authorization: Bearer $PAT" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Der Quartalsbericht ist zur Prüfung bereit.",
    "target_lang": "en"
  }'
```

```json theme={null}
{
  "translated_text": "The quarterly report is ready for review.",
  "source_lang": "de",
  "target_lang": "en"
}
```

Next: [Manage tokens →](/guides/api-walkthrough/manage-tokens)
