Skip to main content

Translate Text

POST 

/openai/v1/chat/completions

Translate text between Bambara, French and English.

Text translation has no dedicated endpoint in the OpenAI shape, so Djelia's translation model is addressed as a chat model. The text to translate is the last user message; the language pair comes from extra_body.

client.chat.completions.create(
model="banjugu-1",
messages=[{"role": "user", "content": "Bonjour"}],
extra_body={"djelia": {"source_language": "fra_Latn", "target_language": "bam_Latn"}},
)

Languages use the same codes as the native API: bam_Latn, fra_Latn, eng_Latn.

Usage counts are characters, not tokens. Djelia meters translation per character, and usage reports what you are actually billed for.

Ignored: temperature, top_p, n, max_tokens, stop, presence_penalty, frequency_penalty, logit_bias, logprobs, top_logprobs, seed, user, response_format, tools, tool_choice, store, metadata, service_tier. Djelia's translation model is not a general chat model and has no tool use.

Request

Responses

The translation. stream=true returns chat.completion.chunk events instead.