Chat Completions
Send chat messages through the gateway using an OpenAI-compatible request shape.
Endpoints
Both chat completion paths accept the same request body. Prefer the plural OpenAI-compatible alias when configuring official OpenAI SDKs.
| Usage | Endpoint |
|---|---|
| Primary proxy endpoint | POST https://api.zunova.net/open/v1/chat/completion |
| OpenAI-compatible plural alias | POST https://api.zunova.net/open/v1/chat/completions |
| SDK baseURL | https://api.zunova.net/open/v1 |
The gateway forwards compatible request fields to the upstream provider and preserves the upstream response as much as practical.
Request body
At minimum, provide a model and a messages array. Additional OpenAI-compatible fields may be forwarded depending on the upstream provider.
| Field | Required | Description |
|---|---|---|
model | Yes | Active public model identifier, for example zunova-m1. |
messages | Yes | Ordered list of system, user, assistant, or tool messages. |
temperature | No | Creativity control. Lower values are more deterministic. |
max_tokens | No | Optional output budget when supported upstream. |
stream | No | When the upstream returns SSE, the gateway streams it through and logs usage when available. |
Non-streaming example
curl https://api.zunova.net/open/v1/chat/completions \
-H "Authorization: Bearer $ZUNOVA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "zunova-m1",
"messages": [
{ "role": "user", "content": "Explain request tracing in two bullets." }
],
"temperature": 0.2
}'Streaming example
If the upstream provider returns Server-Sent Events, Zunova forwards the stream with no buffering where possible.
curl https://api.zunova.net/open/v1/chat/completions \
-N \
-H "Authorization: Bearer $ZUNOVA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "zunova-m1",
"stream": true,
"messages": [{ "role": "user", "content": "Give me a short checklist." }]
}'Model validation
Requests are checked against active model identifiers when the gateway can resolve the model. Unknown or inactive models are rejected before sending traffic upstream.
- Use
/open/v1/modelsto list models available to your key. - Use the public model id exactly as returned by the models endpoint.
- A renamed, disabled, or inactive model can produce
invalid_requestwith invalid model metadata in logs.
Errors and limits
| Status | Code | Meaning |
|---|---|---|
400 | invalid_request | Model/messages are invalid, JSON is malformed, or the model is unknown/inactive. |
401 | unauthorized | Missing or invalid Authorization: Bearer token. |
413 | invalid_request | Request body exceeds the configured maximum request size. |
429 | quota_exceeded | Daily quota or per-minute rate limit reached. |
502 | internal_error | Upstream provider fetch failed. |
504 | internal_error | Upstream provider timed out. |
Server environment
OMNI_BASE_URLmust be an HTTPS base URL without credentials, query, or fragment.OMNI_API_KEYis used server-side for upstream Omni auth and is never taken from the client Authorization header.OMNI_TIMEOUT_MSdefaults to30000milliseconds.OMNI_MAX_REQUEST_BYTESdefaults to10485760bytes, or 10 MiB.- Current proxy guardrails enforce daily and per-minute limits from the active plan when available.