Provider
Savant Gateway
The service serving the request. The API exposes it as owned_by: "savant-gateway".
Integration reference
Savant Gateway exposes an OpenAI-compatible Chat Completions API for available models across families, including Claude when listed. Read the model object to choose a row, then send its id to the chat endpoint. All paths below are relative to your deployment origin; $GATEWAY_URL stands for that origin in the examples.
Vocabulary
The model object carries all three. They are not interchangeable, and a consumer should never derive one from another.
Provider
Savant Gateway
The service serving the request. The API exposes it as owned_by: "savant-gateway".
Family
GPT · Claude · DeepSeek · …
The upstream model line. Family never describes price or access.
Price group
paid · subscription
The billing class. This is the group field and the authoritative access signal.
| Group | Billing | Routing |
|---|---|---|
paid | Debits prepaid account credit at the listed sell price after settlement. | Requires a sell price and available credit. |
subscription | Each input and output token counts once toward the plan allowance. When the allowance runs out, the plan blocks calls or charges prepaid credit. | Requires an active subscription whose snapshot includes this model; otherwise 403 subscription_required. |
Authentication
Create a key on your account page. Keys are account-scoped, hashed at rest, and revoked immediately. Send either a bearer token or x-api-key on every /v1 request.
curl "$GATEWAY_URL/v1/models" \
-H "Authorization: Bearer sk-..."x-api-key: sk-... is accepted as an alternative. A missing key returns 401 with type authentication_error.
GET /v1/models
Returns every active, in-catalog model visible to consumers. Prices are our sell prices in USD per 1M tokens; upstream cost is never included.
curl "$GATEWAY_URL/v1/models" \
-H "Authorization: Bearer sk-..."{
"object": "list",
"data": [
{
"id": "gpt-6.1-sol",
"object": "model",
"owned_by": "savant-gateway",
"name": "Gpt 6.1 Sol",
"family": "GPT",
"group": "paid",
"group_slug": "paid",
"group_label": "Paid",
"group_billing_mode": "paid",
"requires_subscription": false,
"context_window": "1M",
"input_price_per_1m": 0.4,
"output_price_per_1m": 0.6,
"currency": "usd",
"supports_tools": true,
"supports_vision": true,
"health": "live"
}
]
}Example values are illustrative. Call the endpoint for live names, prices, and availability.
GET /v1/models/{id}
Returns the same model object the list publishes, or a 404 with code model_not_found. The id is the one the list published: a model name, or a name behind free/ or subscription/. Send it literally; a slash in an id only ever separates a billing tier. The same key is required.
curl "$GATEWAY_URL/v1/models/gpt-6.1-sol" \
-H "Authorization: Bearer sk-..."{
"error": {
"message": "Model 'gpt-6.1-sol' not found",
"type": "invalid_request_error",
"param": null,
"code": "model_not_found"
}
}Model object
Use id for requests, family for presentation and filtering, and group for billing and access decisions.
| Field | Type | Meaning | Example |
|---|---|---|---|
id | string | Public model id. Send this value as model in a completion. | gpt-6.1-sol |
object | "model" | Object type. Always model. | model |
owned_by | string | Provider identity. Always savant-gateway; not a family or price group. | savant-gateway |
name | string | Human-readable display name. | Gpt 6.1 Sol |
family | string | Model line, such as GPT, Claude, DeepSeek, Gemini, GLM, Kimi, or Grok. | GPT |
group | paid | subscription | Billing mode of the assigned group. Read this field before routing or budgeting. | paid |
group_slug | string | Stable slug of the assigned group, including operator-created groups. | resale |
group_label | string | Operator-facing label for the assigned group. | Resale |
group_billing_mode | paid | subscription | Billing mode, duplicated additively for group-aware clients. | paid |
requires_subscription | boolean | True when the row's billing mode is subscription. A call needs an active plan that includes this model. | false |
context_window | string | Provider context notation. Treat it as informational. | 1M |
input_price_per_1m | number | Our sell price in USD per 1M input tokens. Zero on an unpriced row. | 0.4 |
output_price_per_1m | number | Our sell price in USD per 1M output tokens. Upstream cost is never exposed. | 0.6 |
currency | "usd" | Currency for both sell prices. | usd |
supports_tools | boolean | Whether the model accepts tool definitions. | true |
supports_vision | boolean | Whether the model accepts image content. | true |
health | string | null | Provider-reported health label. Informational; routing still checks group and price. | live |
POST /v1/chat/completions
Body fields follow the OpenAI chat-completions shape. The gateway substitutes the upstream model id, applies paid-call credit admission, and streams the provider response back.
| Field | Type | Meaning | Example |
|---|---|---|---|
model | string | Required. A public id from GET /v1/models. | gpt-6.1-sol |
messages | array | Required, non-empty. OpenAI-style objects with role and content. | [{ role: "user", content: "Hello" }] |
stream | boolean | Optional. When true the response is text/event-stream instead of JSON. | false |
max_tokens | integer | Optional. The gateway defaults to 4,096 and rejects values above 65,536. | 512 |
max_completion_tokens | integer | Optional. Takes precedence over max_tokens when both are present. | 512 |
tools | array | Optional. Forwarded unchanged when the model supports tools. | […] |
temperature, top_p, … | protocol-specific | Forwarded or translated per protocol. The wire-field table below lists exactly which fields each path honours. | 0.7 |
curl "$GATEWAY_URL/v1/chat/completions" \
-H "Authorization: Bearer sk-..." \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-6.1-sol",
"messages": [{ "role": "user", "content": "Hello" }],
"max_tokens": 512,
"stream": false
}'{
"id": "chatcmpl_...",
"object": "chat.completion",
"model": "gpt-6.1-sol",
"choices": [
{
"index": 0,
"message": { "role": "assistant", "content": "Hello." },
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 12,
"completion_tokens": 2,
"total_tokens": 14
}
}Set stream: true for text/event-stream. Frames use the OpenAI-style chunk shape and end with data: [DONE]. Usage is settled after the response or stream closes.
Wire-field support
A model served over OpenAI chat receives the body essentially unchanged. A model served over Anthropic Messages is translated, and fields with no Anthropic equivalent are ignored rather than emulated.
| Field | OpenAI chat | Anthropic Messages | Detail |
|---|---|---|---|
model | Rewritten to the upstream id | Rewritten to the upstream id | The public id is a routing name and is never forwarded. |
messages | Forwarded | Translated to Anthropic content blocks | Text and tool calls translate. A remote http(s) image_url is dropped; only data: URLs become base64 image blocks. |
system / developer | Forwarded unchanged | Joined into the top-level system prompt | Developer messages are treated as system text on the Anthropic path. |
max_tokens / max_completion_tokens | Forwarded; a default is pinned when absent | Mapped to max_tokens | max_completion_tokens wins when both are sent. Values above 65,536 are rejected before dispatch. |
temperature, top_p | Forwarded | Forwarded | Only numeric values are forwarded on the Anthropic path. |
stop | Forwarded | Mapped to stop_sequences | A single string becomes a one-entry sequence list. |
tools, tool_choice | Forwarded | Translated | Function parameters become input_schema; required becomes any; a named function becomes a tool choice. |
response_format | Forwarded | Ignored | An Anthropic-served model returns prose even when a JSON response_format was requested. |
seed, logprobs, top_logprobs | Forwarded | Ignored | No emulation is attempted; these fields never reach the provider. |
n, frequency_penalty, presence_penalty | Forwarded | Ignored | One completion is returned on the Anthropic path. |
parallel_tool_calls, user | Forwarded | Ignored | Provider-specific; check the upstream model before relying on it. |
stream | Forwarded; include_usage is added | Forwarded and translated back to OpenAI chunks | Both paths end with data: [DONE]; usage is settled after the stream closes. |
Errors
A failed request returns a non-2xx status and an error object with message, type, param, and code.
| Status | Type | Meaning |
|---|---|---|
| 400 | invalid_request_error | Invalid JSON, missing model, empty messages, or an over-limit output budget. |
| 401 | authentication_error | Missing or invalid API key. Send Bearer or x-api-key. |
| 402 | insufficient_quota | subscription_past_due | subscription_limit_reached | Credit cannot cover the request, the subscription is past due, or its included allowance is exhausted under a block policy. |
| 403 | subscription_required | The model belongs to a subscription group and no active plan snapshot includes it. |
| 404 | model_not_found | The model id is not in the public catalog. |
| 503 | model_unpriced | model_unavailable | The row has no sell price or is disabled upstream. |
| 502 | upstream_error | The provider failed or returned an invalid response. |
{
"error": {
"message": "Insufficient credit balance for this request.",
"type": "insufficient_quota",
"param": null,
"code": null
}
}Create an account for a key and prepaid credit, or browse the live model table before choosing a route.