Kooma API
Français API keys Sign up

POST Translation

Translates text from one language to another — Bambara ↔ French / English and major international languages — with automatic source-language detection.

POST/v1/translations

Body JSON. Required permission: mt.

Parameters

NameTypeDescription
textrequiredstringThe text to translate (5,000 characters max).
targetoptionstringTarget language (see Languages). Default bam_Latn.
sourceoptionstringSource language. Absent or auto = automatic detection.
modeloptionstringBambara translation model version: bambara-1.75 (default), bambara-1.7 or bambara-1.6. Any other value is rejected (422 invalid_model).

Response

FieldTypeDescription
textstringThe translated text.
sourcestringDetected source language (useful if auto).
targetstringTarget language.
translationsarrayList of translations {text, source, target}.

Billed per character of source text — same rate whatever model.

curl https://api.kooma.ai/v1/translations \
  -H "Authorization: Bearer sk-intermo-YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Bonjour, comment allez-vous ?",
    "target": "bam_Latn",
    "model": "bambara-1.75"
  }'
200 OK application/json
{
  "text": "I ni ce, i ka kɛnɛ wa?",
  "source": "fra_Latn",
  "target": "bam_Latn",
  "translations": [
    {
      "text": "I ni ce, i ka kɛnɛ wa?",
      "source": "fra_Latn",
      "target": "bam_Latn"
    }
  ]
}
↑↓ navigate↵ openesc close