Skip to main content
Zunova

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.

UsageEndpoint
Primary proxy endpointPOST https://api.zunova.net/open/v1/chat/completion
OpenAI-compatible plural aliasPOST https://api.zunova.net/open/v1/chat/completions
SDK baseURLhttps://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.

FieldRequiredDescription
modelYesActive public model identifier, for example zunova-m1.
messagesYesOrdered list of system, user, assistant, or tool messages.
temperatureNoCreativity control. Lower values are more deterministic.
max_tokensNoOptional output budget when supported upstream.
streamNoWhen 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/models to 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_request with invalid model metadata in logs.

Errors and limits

StatusCodeMeaning
400invalid_requestModel/messages are invalid, JSON is malformed, or the model is unknown/inactive.
401unauthorizedMissing or invalid Authorization: Bearer token.
413invalid_requestRequest body exceeds the configured maximum request size.
429quota_exceededDaily quota or per-minute rate limit reached.
502internal_errorUpstream provider fetch failed.
504internal_errorUpstream provider timed out.

Server environment

  • OMNI_BASE_URL must be an HTTPS base URL without credentials, query, or fragment.
  • OMNI_API_KEY is used server-side for upstream Omni auth and is never taken from the client Authorization header.
  • OMNI_TIMEOUT_MS defaults to 30000 milliseconds.
  • OMNI_MAX_REQUEST_BYTES defaults to 10485760 bytes, or 10 MiB.
  • Current proxy guardrails enforce daily and per-minute limits from the active plan when available.

On this page