On this page
Core concepts
Model groups
Routing and pricing bundles assigned to API keys: different model mappings, prices, and model sets.
A model group lets the operator serve the same public model id through a different upstream, at a different price, and with a different model subset — per key. Create a Cheap and a Premium group and bind keys to each.
How it works
- Each group row overrides a catalog model's
provider,upstream_model, prices, multiplier, network fee, and advertised limits. Blank fields inherit the catalog row. - A key bound to a group resolves every request through that group. A group with model rows also becomes the key's model allowlist.
- A group with no model rows is transparent: every public model, catalog routing, catalog prices.
- Disabled groups reject traffic on bound keys with
403.
Precedence
Admin API
Example
POST /admin/groups{ "id": "cheap", "name": "Cheap" }
PUT /admin/groups/cheap/models/deepseek-v4.1-flash-1017{ "provider": "inferhub", "upstream_model": "cb/deepseek-v4.1-flash", "price_prompt_per_m": 0.02184, "price_completion_per_m": 0.09048}
PATCH /admin/users/{user_id}/keys/{key_id}{ "group_id": "cheap" }Catalog stays public
Groups never change
GET /v1/models. The public catalog keeps catalog prices; group routing and pricing are applied per key at request and billing time.