Provider Pinning & Max Savings
By default Qubax routes each request to the best available offer for the requested model. Power users can go further: pin routing to specific upstream providers, enforce a minimum savings floor, or register your own provider key as a priority route.
Provider pinning
Pass a provider field in the chat completion body — a single provider or an allow-list array. The request only routes to offers from the providers you list; everything else is excluded even if cheaper.
curl https://api.qubax.ai/v1/chat/completions \
-H "Authorization: Bearer qbx_..." \
-H "Content-Type: application/json" \
-d '{
"model": "glm-5.3",
"messages": [{"role": "user", "content": "Hello!"}],
"provider": "zai"
}'Allow-list form — any of these providers is eligible:
{
"model": "glm-5.3",
"messages": [{"role": "user", "content": "Hello!"}],
"provider": ["zai", "openrouter", "anthropic"]
}zai), display name (Z.ai), or host (api.z.ai). Browse the full registry at GET https://api.qubax.ai/v1/providers — 26 supported upstream providers.Max Savings — minimum-discount routing
Set min_discount (1–100) in the request body to only accept offers at least that far below OpenRouter pricing. If nothing qualifies, the request fails with minimum_discount_not_met instead of silently paying more. You can also set a default per API key on the API keys page.
{
"model": "claude-opus-4.6",
"messages": [{"role": "user", "content": "Hello!"}],
"min_discount": 30
}Anthropic-compatible endpoint
Claude Code and the Anthropic SDK work on any Qubax model — not just Claude — through the Anthropic Messages skin:
export ANTHROPIC_BASE_URL="https://api.qubax.ai"
export ANTHROPIC_API_KEY="qbx_..."
# Claude Code now runs on any Qubax modelThe endpoint accepts standard Anthropic POST /v1/messages payloads (system blocks, content blocks, max_tokens) and returns Anthropic-format responses and SSE events.