API reference
Chat Completions
OpenAI's Chat Completions API, for every model your company can use.
POSThttps://sov.solibra.ai/v1/chat/completions
Request
The body is OpenAI's Chat Completions request: model,
messages, tools, response_format, stream and the rest. Send your Sovereign key as Authorization: Bearer.
curl https://sov.solibra.ai/v1/chat/completions \
-H "Authorization: Bearer $SOV_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-6.1-sol",
"messages": [{"role": "user", "content": "What is a gateway?"}]
}'
reply = client.chat.completions.create(model="gpt-6.1-sol", messages=[{"role": "user", "content": "What is a gateway?"}])
const reply = await client.chat.completions.create({ model: "gpt-6.1-sol", messages: [{ role: "user", content: "What is a gateway?" }] });
Response
A Chat Completions response, or a stream of chunks with "stream": true. usage is always included; for streams the
last chunk carries it. The x-sov-model header names the model that answered.
What Sovereign adjusts
| Field | When | What happens |
|---|---|---|
model |
always | Set to the model chosen for the request. |
| effort | the chosen model reasons | Set to the effort the request needs, in the field the provider takes: reasoning_effort at OpenAI and Google, reasoning.effort through OpenRouter. |
max_tokens |
sent to OpenAI's own API | Sent as max_completion_tokens, the field OpenAI's newer models take. |
stream_options.include_usage |
streaming | Turned on. |