Overview
Bifrost computes request costs using a built-in pricing catalog that is automatically synced from a remote datasheet. Custom Pricing lets you override those catalog prices at runtime without redeploying, applying your own rates for any model across any combination of provider, key, and virtual key scopes. Key capabilities:- Scoped overrides - apply prices globally or narrow them to a specific provider, provider key, or virtual key
- Pattern matching - target an exact model name or a wildcard prefix (e.g.
gpt-4*) - Request type filtering - restrict an override to one or more specific operations (chat, embeddings, image generation, etc.); at least one request type is required
- Hierarchical resolution - the most-specific matching override always wins; broader scopes act as fallbacks
Pricing data source
Before configuring overrides, Bifrost needs a pricing catalog to work from. By default it ships with built-in prices and syncs them every 24 hours. You can point it at a custom pricing URL if you maintain your own datasheet.- Web UI
- config.json
- Navigate to Models in the sidebar
- Click the Pricing Settings tab
- Enter your pricing datasheet URL in the Pricing Datasheet URL field
- Set the Pricing Sync Interval (in hours)
- Click Save
Scope hierarchy
Every override is assigned a scope kind that determines which requests it applies to. When Bifrost resolves pricing for a request, it evaluates all matching overrides and selects the one with the most specific scope. More specific scopes always win over broader ones.Scope identifiers are exclusive to their scope kind - you cannot mix them. For example,
virtual_key_provider requires virtual_key_id and provider_id and must not include provider_key_id.Pattern matching
Thepattern field controls which model names the override applies to. The match_type field controls how the pattern is interpreted.
For wildcard patterns, append a
* at the end of the prefix. For example, claude-3* will match all Claude 3 variants.Lookup precedence
When pricing resolves a request, it tries lookup candidates in this order against the catalog (built-in entries + your overrides):- The alias’s canonical
model_name(routing_info.resolved_key_alias.model_name) - The alias’s wire
model_id(routing_info.resolved_key_alias.model_id) - The model the caller sent (
routing_info.model)
12345-azure-prod) to a catalog-known canonical name (e.g. claude-sonnet-4-5) via Static Aliasing, pricing hits the catalog via the canonical name even though the wire identifier wouldn’t.
When no key-level alias matches, candidates (1) and (2) are absent and the lookup falls straight through to the model the caller sent — preserving pre-alias behavior.
Overrides are matched against the wire model (model_id when an alias matched, otherwise the caller-sent model) so per-deployment override pricing stays addressable regardless of how the catalog entry was found.
Request type filtering
request_types is required and must contain at least one value. Only request types that have pricing support are accepted. Stream variants are treated identically to their base type - specifying chat_completion covers both streaming and non-streaming chat requests.
Creating an override
- Web UI
- API
- config.json
-
Navigate to Models → Pricing Overrides in the sidebar

- Click Create Override
-
Fill in the form:
- Name - a human-readable label
- Scope - select the scope kind and provide the matching IDs
- Pattern - enter the model name or wildcard prefix
- Match type - choose Exact or Wildcard
- Request types - select one or more request types (required)
- Pricing fields - enter the price values you want to override (only non-zero fields are applied)
-
Click Save

Pricing fields reference
Only fields with non-zero values are applied. All values are cost per unit in USD.Token costs
Token tier costs
Cache costs
Image costs
Audio and video costs
Other costs
Examples
Flat rate for all Anthropic models
Apply a single input/output rate to every Claude model globally:Per-virtual-key negotiated rate
A specific virtual key has negotiated lower prices for GPT-4o:Image generation override
Override costs for a specific image model at global scope:Global catch-all for a new model
Use a global override to add pricing for a model not yet in the built-in catalog:Next steps
- Virtual Keys - Attach virtual-key-scoped overrides to virtual keys for per-customer pricing
- Budget and Limits - Understand how costs are tracked against budgets
- Model Catalog - Deep dive into how pricing resolution and cost calculation work internally

