Skip to content
Sovereign route — served only inside the KingdomInternational route — frontier models, served abroad
Docs

The API, on both routes

Everything here applies to both routes. Each route's own page has its models, prices and samples.

Sovereign · KSA onlyhttps://inference.sigmix.sa/ksa-sovereign-route-only/v1
Internationalhttps://inference.sigmix.sa/international-route-only/v1

Authentication

Bearer keys

Send the key as Authorization: Bearer, followed by the key. x-api-key is accepted too, for SDKs that send it.

One route per key

Sovereign keys start sgx-ksa-, international keys sgx-intl-. A key on the other route's path is refused with wrong_route.

Shown once

We keep a fingerprint of each key, never the key. Revocation takes effect on the next request.

Authorization: Bearer sgx-ksa-…      # sovereign key
Authorization: Bearer sgx-intl-…     # international key

OpenAI compatibility

Request and response shapes follow OpenAI's, so the official SDKs work by changing base_url and api_key.

Endpoints

chat/completions, embeddings, audio/speech, audio/transcriptions, audio/translations, images/generations, and GET models.

Response headers

x-request-id on every response; x-sigmix-route; x-sigmix-charge-usd with the exact charge on non-streamed responses (a stream's charge is on the Usage page); x-sigmix-max-tokens-clamped when max_tokens was above the model's limit.

Model ids

Use the id from the route's model list or GET /v1/models. The same id can exist on both routes as two separate models with two prices.

Not supported yet

The Responses and Assistants APIs, file uploads and fine-tuning. Image URLs in chat work where the model fetches them; on some international models only base64 data URLs are accepted.

Streaming

stream: true on chat completions returns server-sent events in OpenAI's chunk format, ending with data: [DONE].

  • A stream is refused below the streaming balance floor, shown on the pricing page. Requests without stream work at any balance that covers them.
  • The most a stream could cost — its max_tokens — is reserved before the first token. max_tokens is always sent to the model, so the ceiling holds.
  • Close the connection and generation stops; you are charged for what was generated, not for the ceiling.
  • Send stream_options.include_usage to receive the usage chunk; billing uses it either way.

Errors

Errors use OpenAI's shape, with a code that says whose problem it is. Nothing is charged for a request that failed.

{
  "error": {
    "message": "Your available balance does not cover this request…",
    "type": "insufficient_quota",
    "code": "insufficient_credit",
    "param": null,
    "request_id": "6f0c…"
  }
}
HTTPCodeWhoseMeaningWhat to do
401invalid_api_keyYoursThe key is missing, malformed, unknown or revoked.Send Authorization: Bearer with a current key from the console.
403wrong_routeYoursThe key belongs to the other route.Use the key on its own base path, or create a key for this route.
403account_suspendedYoursThe account is suspended or closed.Contact us.
400invalid_requestYoursThe body is malformed or a field is invalid.Read error.param and error.message.
404unknown_endpointYoursThere is no endpoint at that path.Check the path against the endpoints table.
404model_not_foundYoursThat model is not published on this route.GET /v1/models lists what is.
403model_not_allowedYoursThe key is restricted to other models.Edit the key's allowed models.
400modality_mismatchYoursThe model is called on a different endpoint.Use the endpoint named in the message.
413payload_too_largeYoursThe body is over 16 MB, or the audio over 25 MB.Send less, or split the audio.
402insufficient_creditYoursYour available balance does not cover the most this request could cost.Add credit, or lower max_tokens.
402paid_credit_requiredYoursFree-trial credit cannot pay for this model, and your paid balance does not cover the most this request could cost.Top up, or use a model included in the free trial.
403streaming_not_allowedYoursStreaming is off for this key or account, or the balance is under the floor.Send without stream: true, or add credit.
429rate_limitedYoursToo many requests this minute for this key.Wait for Retry-After seconds.
429concurrency_limitYoursToo many requests at once for this key.Wait for one to finish, or raise the key's limit.
429spend_cap_reachedYoursA daily, monthly or per-request cap you set has been reached.Raise the cap on the key, or wait for the window.
503gateway_disabledPausedThe operator has paused the API.Retry after Retry-After seconds; see /status.
503route_disabledPausedThe operator has paused this route.Retry later. A sovereign request is not moved to the other route.
503modality_disabledPausedThe operator has paused this endpoint.Retry later.
503model_disabledPausedThe operator has paused this model.Retry later, or use another model.
503capacity_exhaustedOursEvery endpoint for this model is busy.Retry after a moment.
503upstream_unavailableOursNo endpoint on this route can serve the model right now.Retry; see /status.
504upstream_timeoutOursThe model did not answer in time.Retry, or lower max_tokens.
502upstream_errorOursThe model endpoint failed.Retry. Not charged.
400upstream_rejectedYoursThe model refused the request — too long, or an unsupported parameter. Its own status and message are passed on.Read the message; shorten or adjust the request.
504deadline_exceededYoursThe request reached the 15-minute limit. A streamed answer stops there and only what was generated is charged; a request that had not started answering is not charged.Lower max_tokens, or split the work.
503service_restartingOursThe API was restarting. A streamed answer in progress stops and only what was generated is charged; a request that had not started is not charged.Retry after Retry-After.
500internal_errorOursSomething failed on our side.Retry, and quote request_id if it persists. Not charged.

Limits

Rate

Requests per minute per key: the platform default unless you set your own on the key. Exceeding it returns 429 with Retry-After.

Size

JSON bodies up to 16 MB; audio up to 25 MB; up to 8 choices (n) per chat request and 10 images per image request.

Retries

If an endpoint fails before answering, the gateway retries on another endpoint on the same route. Retry yourself on 429, 503 and 504; never on 4xx.

What we keep

For each request: when, which key, which model and route, the token, character, second or image counts, the charge, the latency and the outcome. Never the prompt, the completion, the audio or the image.

On the international route, the provider that answers processes the request under its own terms.