Djelia Extensions
Djelia extends the OpenAI request format wherever possible, while introducing additional options through a dedicated djelia object for settings unique to the platform.
Sending JSON Requests
Each client exposes arbitrary body fields its own way. Pick yours:
- Python
- JavaScript
- Go
- curl
Use the extra_body parameter to include Djelia-specific options:
translation = client.chat.completions.create(
model="banjugu-1",
messages=[{"role": "user", "content": "Bonjour"}],
extra_body={
"djelia": {
"source_language": "fra_Latn",
"target_language": "bam_Latn",
}
},
)
There is no extra_body. Unknown keys on the params object are sent as provided, and
spreading them keeps TypeScript's excess property check quiet:
const translation = await client.chat.completions.create({
model: "banjugu-1",
messages: [{ role: "user", content: "Bonjour" }],
...{ djelia: { source_language: "fra_Latn", target_language: "bam_Latn" } },
});
Use the WithJSONSet request option to add a field the struct does not define:
translation, err := client.Chat.Completions.New(context.TODO(),
openai.ChatCompletionNewParams{
Model: "banjugu-1",
Messages: []openai.ChatCompletionMessageParamUnion{openai.UserMessage("Bonjour")},
},
option.WithJSONSet("djelia", map[string]string{
"source_language": "fra_Latn",
"target_language": "bam_Latn",
}),
)
Add a djelia key directly in your JSON payload:
curl https://api.djelia.cloud/openai/v1/chat/completions \
-H "Authorization: Bearer $DJELIA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "banjugu-1",
"messages": [{"role": "user", "content": "Bonjour"}],
"djelia": {
"source_language": "fra_Latn",
"target_language": "bam_Latn"
}
}'
For a full example, see our Python integration guide.
Translation Language Pair
When using the banjugu-1 model, both source and target languages are required:
| Field | Accepted values |
|---|---|
djelia.source_language | bam_Latn, fra_Latn, eng_Latn |
djelia.target_language | bam_Latn, fra_Latn, eng_Latn |
The source and target language codes must differ. Requests with missing, unknown, or identical codes will receive a 400 error.
Speech Sampling Options
The jifili-1 model accepts the following optional parameters:
| Field | Range |
|---|---|
djelia.temperature | 0.0 to 2.0 |
djelia.top_p | Greater than 0.0, up to and including 1.0 |
djelia.repetition_penalty | Greater than 0.0, up to 2.0 |
Any omitted parameter will use the model server’s default value.
jifili-1 uses the fixed voice moussa and does not support the deprecated djelia.description or djelia.speaker fields.
Voice behavior details:
- Until September 19, 2026,
djelia-tts-v1selects voices using the numericdjelia.speakerand ignoresvoiceanddjelia.description. djelia-tts-v2recognizesdjelia.description.jifili-1uses only thevoicefield.
For jifili-1, the moussa voice is available along with OpenAI voice names mapped to it: alloy, nova, and coral. Any other name results in a 400 unsupported_voice error.
The djelia.chunk_size field (0.1 to 2.0 seconds, default 1.0) is validated but ignored by jifili-1, as chunk size is determined by Djelia itself.
Multipart Requests
Endpoints /audio/transcriptions and /audio/translations expect multipart/form-data rather than a JSON djelia object.
To request translation into French, add the form field language=fra_Latn. If omitted, English (eng_Latn) is used by default.