Skip to main content

Overview

Model Pricing sets how much each model costs per million tokens. Those prices drive every cost figure on the platform: Model Pricing lives in the Barndoor portal under LLM Management → Model Pricing.
Model Pricing section showing the Org rules, Archive, and Barndoor defaults tabs
Barndoor maintains a curated catalog of default prices for common models across OpenAI, Anthropic, AWS Bedrock, Google Vertex AI, Azure OpenAI, and more, and applies it automatically. Those models are costed out of the box, with no setup. You only need your own rules to override a Barndoor price (a negotiated discount, a different vendor rate) or to price a model the catalog doesn’t cover (a fine-tune, a private deployment, a brand-new model).
A request for a model that no rule covers — neither yours nor a Barndoor default — still succeeds, but is recorded at $0. Spending budgets don’t move and reports show zero cost. These models are shown as Unpriced wherever the portal lists pricing.

Before You Begin

  • A Barndoor account with admin privileges.
  • An LLM Gateway with at least one provider and one model configured — see Using the LLM Gateway.

The Three Tabs

Search matches the model pattern. You can also paste a pricing rule ID (for example from a request log) to find the rule, or an older version of it, on whichever tab it lives. Filter by scope and catalog, and sort by the column headers.

How Cost Is Computed

Cost is calculated after a successful upstream response, from the token counts the provider reports. Failed requests record no cost. All prices are USD per million tokens.
  • Input tokens exclude tokens served from the prompt cache, which are billed separately at the cache read price.
  • Output tokens include any reasoning tokens the provider reports; reasoning isn’t billed separately.
  • A rule with no cache read or cache write price bills those tokens at the rule’s input price.
  • If the rule has a long-context surcharge and the request’s total prompt (input plus cache reads and writes) is at or above its threshold, the whole request — output included — is billed at the surcharge rates.
  • Rules match the underlying model name the provider is called with (for example anthropic.claude-opus-5-5 on a Bedrock provider), not the route name the caller sent.
A provider whose Calculate token cost setting is turned off (a flat-rate subscription, self-hosted inference, or usage billed elsewhere) records $0 for every request, even where a pricing rule matches. Those requests are labelled Not metered, not Unpriced: the rate is known to be zero rather than unknown. Change this in the provider’s settings.

How Pricing Resolves

For each request, Barndoor looks for a matching rule in this order. The first tier with a match wins.
Request to cost
?
Provider calculates token cost?Set in the provider’s settings
No: $0 · Not metered
Yes: most specific tier first
1
Provider Instance ruleThis provider connection
Match: use rate
2
Catalog ruleThis vendor line, such as OpenAI or AWS Bedrock
Match: use rate
3
Generic ruleAny provider
Match: use rate
4
Barndoor defaultBarndoor’s catalog price
Match: use rate
No match
$0, labelled UnpricedAdd a pricing rule to cost this model
Within a tier, the most specific pattern wins: an exact name beats a wildcard, and a longer wildcard beats a shorter one — so claude-sonnet-5-5* beats claude-*, and a catch-all * loses to everything. A higher tier always wins, however specific a lower-tier pattern is. In the portal, each model shows the price it resolves to and where it came from: Org rule (this provider), Org rule (provider type), Org rule, Barndoor default, Not metered, or Unpriced.
Stick to Generic rules for everyday pricing. Use Catalog or Provider Instance rules only when the same model genuinely has a different price on different vendors or connections.

Importing Barndoor Defaults

Importing copies a Barndoor default into your org rules so you can edit it, pin it, or keep it in sync. You don’t need to import a default for it to apply.
1

Open LLM Management → Model Pricing → Barndoor defaults

Or click Add Pricing Rule → A Barndoor default.
2

Import one row

Click Import on a row and choose how it should track Barndoor: Tracking, Pinned, or Auto-sync (see Keeping Prices in Sync).
3

Or import several

Click Select to import, tick rows (filter by catalog and use the header checkbox to select a whole vendor), pick a Sync behavior, and click Import N.
An imported row shows View rule, which jumps to your org rule.

Creating a Pricing Rule

1

Click Add Pricing Rule → A custom rule

The Add Pricing Rule dialog opens.
2

Model Pattern

Pick a model you’ve enabled from the dropdown, or type a pattern. Use * as a wildcard at the start, the end, or both:
  • gpt-5.4-mini — exactly that model.
  • gpt-5.4* — any model starting with gpt-5.4.
  • *-mini — any model ending in -mini.
  • *claude-sonnet-5-5* — any model containing claude-sonnet-5-5 (useful for Bedrock IDs with regional prefixes).
A * in the middle of a pattern (gpt-*-mini) and regular expressions aren’t supported.
3

Catalog and Provider (optional)

  • Catalog — restrict the rule to one vendor line. Leave on Any catalog for a Generic rule.
  • Provider — restrict it to one configured provider connection. Available once a catalog is picked; leave on Any provider in catalog for a Catalog rule.
4

Prices

  • Input Cost (/1Mtokens)∗∗and∗∗OutputCost(/1M tokens)** and **Output Cost (/1M tokens) — required.
  • Prompt caching — Cache Read and Cache Write prices ($/1M tokens). Leave cache read blank and cached tokens are billed at the full input price, which overstates cost against the provider’s cache discount. Cache write applies to Anthropic models.
  • Long-context surcharge (optional) — tick it for models whose price rises once a prompt is large. Set Applies at or above (prompt tokens) (pre-filled with 200000) and the input and output prices above the threshold; blank cache prices above the threshold bill at the surcharge input price.
5

When this takes effect

Choose Take effect immediately or Schedule for later and pick a date and time (in your local time zone, accurate to about ±5 minutes).
6

Sync behavior and reason

  • Sync behavior — only I’ll manage it is available unless the pattern and catalog match a Barndoor default.
  • Change reason (optional) — recorded in the rule’s Pricing History.
7

Save

An immediate rule applies to requests within a few minutes. A scheduled rule shows a Scheduled badge until it activates.
Add Pricing Rule dialog with model pattern, catalog, provider, prices, scheduling, and sync behavior
If enabling a model is blocked because it has no price, the portal can bring you here with the model pre-filled. Save with … & return to to go straight back to where you were.

Editing and Scheduling Price Changes

Click the pencil icon on a row to open Edit Pricing. Every save creates a new version of the rule; an existing price is never overwritten in place. That means:
  • Past and current versions are an audit trail and can’t be changed or removed.
  • Scheduled future versions can be edited or cancelled from the rule’s Pricing History.
  • Changes are forward-looking. They apply only to requests after the new version becomes active; they don’t re-cost past requests or adjust spending already counted against a budget.
In Edit Pricing you can change the prices, cache prices, long-context surcharge, timing, sync behavior, and change reason. The model pattern, catalog, and provider can’t be changed — create a new rule for a different scope, and archive the old one if you no longer need it. Rows with pending future versions show Scheduled (or N scheduled). To change or cancel one before it activates, open the row’s history and use the pencil (Edit Scheduled Change) or trash icon next to the scheduled entry.

Reset to default

When your price for a pattern differs from Barndoor’s, the row’s badge shows Custom and a Reset to default action appears on the row and in Edit Pricing. It creates a new version with the current default input and output prices, recorded with the reason Reset to default.
Reset to default uses the current default, not the one you originally imported. If Barndoor has changed its price since, Reset moves you to the new value.

Archiving and Restoring Rules

To stop using a rule, click the archive icon on its row (or Select rules, tick several, and click Archive N). Archiving:
  • removes the rule from Org rules, so cost falls back to the next matching tier — typically the Barndoor default, or $0 if nothing else matches;
  • cancels any scheduled changes on the rule;
  • keeps the rule’s full history, visible on the Archive tab.
To bring a rule back, open Archive and click restore (or select several and click Restore N). The rule returns to Org rules at its last live price, and costing resumes within a few minutes. Edit it afterwards if the provider’s rate has moved on.

Pricing History

The clock icon on a row opens Pricing History — every version of that rule, newest first. Each entry shows:
  • the input, output, and cache prices at that version, with the change from the previous version;
  • when it took effect (or will take effect);
  • who made the change;
  • how it was made: Created, Edited, Scheduled, Imported, Synced (manual), Auto-sync, Archived, or Restored;
  • the Change reason, if one was given.
Future-dated entries carry edit and cancel icons. Past entries are part of the audit trail and can’t be removed — they’re what Barndoor uses to know what a past request cost at the time.

Keeping Prices in Sync with Barndoor’s Catalog

Barndoor updates its defaults as provider prices change. Each imported rule has a Sync behavior that decides what happens when a default it was imported from changes. Pick it when importing, and change it later in Edit Pricing.

Reviewing updates

When tracked rules are behind Barndoor’s defaults, a banner reads N imported prices have a new Barndoor default. Click Review updates to open Review pricing updates, which lists each affected rule with its current and new prices. Tick the rules to adopt and click Sync N Prices; unticked rules keep their current price and stay flagged. To stop being prompted about a rule, set its sync behavior to I’ll manage it in Edit Pricing.
Auto-sync keeps you on Barndoor’s prices with no interaction, at the cost of prices changing underneath you. Prompt me on updates surfaces each change for review first — a good fit when prices feed spending budgets you don’t want to shift quietly.

Badges on Org Rules

Require Pricing for Model Routes

The Require pricing for Model Routes toggle at the top of Model Pricing stops models that would be recorded at $0 without anyone deciding so.
'Require pricing for Model Routes' toggle at the top of the Model Pricing section
When on:
  • A model can’t be enabled, and a route can’t be added or re-enabled, unless the model is covered by an org rule or a Barndoor default. The save is refused with a message saying the model has no pricing.
  • Models on a provider whose Calculate token cost setting is off pass automatically — they’re $0 by design.
  • Already-enabled models with no coverage keep serving traffic at $0 and are flagged Unpriced in the model list, with a Disable N unpriced action to switch them off in bulk.
When off (default), any model can be enabled; uncovered models are recorded at $0.

Troubleshooting

Check the model’s pricing label in the portal:
  • Unpriced — no rule matches. The model may be missing from Barndoor’s catalog (a fine-tune, a private model, a very new model), or your pattern doesn’t cover the underlying model name — remember rules match the name the provider is called with, not the route name. Add a rule.
  • Not metered — the provider’s Calculate token cost setting is off. This is intentional; change the provider setting if it shouldn’t be.
  • A price is shown but it’s $0.00 — one of your rules sets zero prices and outranks the default. Edit or archive it.
Price changes are forward-looking. They affect requests after the new version is active; they don’t re-cost past requests or change what’s already counted against a budget. To correct a budget after a price fix, contact [email protected].
The gateway picks up pricing changes within a few minutes. If you used Schedule for later, the price won’t apply until the scheduled time — open the rule’s history to confirm the Scheduled entry.
Open the rule’s Pricing History (clock icon) and click the trash icon next to the scheduled entry. Only future versions can be cancelled.
The higher tier wins (Provider Instance, then Catalog, then Generic, then Barndoor default). Within a tier, the most specific pattern wins. Avoid two different patterns that are equally specific and both match the same model — there’s no principled winner between them.
The rule probably has no Cache Read price, so cached tokens are billed at the full input price. Set the cache read price in Edit Pricing.

Frequently Asked Questions

That’s your choice per rule: Prompt me on updates flags changes for review, I’ll manage it never changes, and Auto-sync to Barndoor follows the default automatically. See Keeping Prices in Sync.
USD only. All prices are entered, recorded, and reported in US dollars.
Yes — use a Provider Instance rule for each provider connection that needs its own price. Rules match the underlying model name, so two route names that reach the same model on the same provider share one price.
Multiply by 1,000. If your provider quotes $0.0025 per 1K input tokens, enter 2.50 as the input cost per million.
Only if Barndoor’s catalog doesn’t cover the model. For a custom or self-hosted embedding model, add a rule with the input price and leave output at 0 — embeddings consume input tokens only.
Archive it instead. Archiving takes it out of use and keeps its history; you can restore it from the Archive tab.

Need Help?

Reach out to [email protected] with:
  • The model name (and provider) you’re trying to price.
  • The pattern and prices you’ve configured (a screenshot of the row helps).
  • What you’re seeing — $0 cost, a budget not moving, an Unpriced label, and so on.