API keys & routing

A key is a routing rule: it decides which vendors and models a request may reach and how the gateway chooses between pricing groups. Keys are created under API Keys in the console and look like sk-xxxxxxxx.

1. Three routing modes

Choose a routing mode when creating the key:

ModeReachableGood for
By vendordefaultEvery model of the chosen vendor (Anthropic = all Claude models); smart routing inside that vendor's groupsSingle-vendor clients such as Claude Code / Codex; one key per team or project
By modelOnly the ticked models, across vendors; still routed to the cheapest available groupRestricting downstream systems or contractors to specific models
All models and vendorsEverything on the platformPersonal use, multi-model clients like Cherry Studio / Chatbox
Vendor vs. model name

The model field says what to call; the key's routing mode says whether that model is allowed and which group serves it. Calling gpt-5.6-terra with an Anthropic-only key returns 403 — switch to an "all models" key or tick the model in "by model".

2. How smart routing picks a group

The same model often lives in several pricing groups (for example claude-opus-5-5 in both Claude Enterprise and the coding-plan group). For every request the gateway:

  1. Sorts candidates by effective price

    Candidates = groups available to your account that contain the model, ordered by discounted price ascending (ties by group order).

  2. Tries the cheapest first

    If that group has no healthy channel for the model it moves up to the next one.

  3. Fails over automatically

    Upstream errors are retried on another channel in the same group, then on the next group; you only see an error when everything failed.

  4. Falls back to special groups last

    Models that only exist in the Unlimited group are reached only when no regular group has them; the same applies to Multimedia models (they exist only in that group and are reachable in "all models" mode).

You normally never pick a group by hand; each usage-log entry shows the group and unit price that actually served the call.

3. The group system

Groups are the unit of pricing and upstream pools. Badges on the Models page mean:

GroupMeaningExamples
EnterpriseOfficial full-strength models, no client restrictions, long context, images and search; the main production tierClaude / GPT / Gemini Enterprise, GLM / Kimi / DeepSeek / Qwen Enterprise
EconomyDiscounted pools; GPT Economy is limited to Codex clients and cannot generate images, some pools do not guarantee cache hit ratesClaude / GPT / Gemini / GLM Economy
EduPromotional group excluded from automatic fallback; select explicitlyClaude Edu
WorkflowOfficial list price with the vendor's full catalogue (incl. legacy models); for non-coding toolchains and batch jobsGPT / Claude / GLM / Gemini / Cohere / Mistral Workflow
PlanCoding-plan subscriptions with their own concurrency and quota; falls back to the wallet when used upClaude Code / Codex plans
FreeFree or promotional pools without availability guarantees; a positive balance is still requiredDeepSeek Free, TypeSafe Free tier
MultimediaThird-party unreviewed image / video models — images per image, videos per second (price varies by resolution)Seedance / Seedream / Wan 3.0 / Berry / MiniMax H3 / Qwen Image / Z-Image / Face swap
UnlimitedUncensored and abliterated modelsGLM-5.3 / GLM-5.3 Flash / GLM-4.7 Flash / DeepSeek V4.1 Flash / Qwen3.8 27B unlimited, Roleplay

Discounts, per-model prices and tiered pricing live in the model square, which is the source of truth.

4. Quota modes

ModeBehaviour
UnlimitedBounded only by the account balance (default)
Fixed totalThe key stops (429) once its lifetime spend reaches the cap; raise it any time in the console
PeriodicResets daily / weekly / monthly; the period is anchored to the moment you saved the setting and resets once per full period

Keys can also carry an expiry date and an IP allow-list; deleting a key revokes it immediately.

5. Concurrency and rate limits

6. Account tiers and discounts

Accounts are tiered automatically by cumulative spend (T0 → T1 → T2 → V1 → V2); higher tiers get lower prices in each group, as shown in the model square's tier matrix. Tiers apply to every key on the account — no need to recreate keys.

7. Recommendations

All docs