Kooma API
English Clés API S'inscrire

POST Traduction

Traduit un texte d'une langue vers une autre — bambara ↔ français / anglais et grandes langues internationales — avec détection automatique de la langue source.

POST/v1/translations

Corps JSON. Autorisation requise : mt.

Paramètres

NomTypeDescription
textrequisstringLe texte à traduire (5 000 caractères max).
targetoptionstringLangue cible (voir Langues). Défaut bam_Latn.
sourceoptionstringLangue source. Absent ou auto = détection automatique.
modeloptionstringVersion du modèle de traduction bambara : bambara-1.75 (défaut), bambara-1.7 ou bambara-1.6. Toute autre valeur est refusée (422 invalid_model).

Réponse

ChampTypeDescription
textstringLe texte traduit.
sourcestringLangue source retenue (utile si auto).
targetstringLangue cible.
translationsarrayListe des traductions {text, source, target}.

Facturé au caractère du texte source — même tarif quel que soit model.

curl https://api.kooma.ai/v1/translations \
  -H "Authorization: Bearer sk-intermo-VOTRE_CLE" \
  -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"
    }
  ]
}
↑↓ naviguer↵ ouvriresc fermer