Overview
Model Pricing is where you tell Barndoor how much each model costs per million input and output tokens. Barndoor uses your prices to:- enforce spending budgets in LLM Controls
- record per-request
estimated_costvalues on every audit event (input cost, output cost, total) - power per-team / per-user / per-model cost attribution in the Reporting area

Before You Begin
- A Barndoor account with admin or superadmin privileges.
- An LLM Gateway with at least one provider and one model already configured — see Using the LLM Gateway.
Quickstart: Import Default Prices
Barndoor ships a curated catalog of market-rate prices for the most-popular providers (OpenAI, Anthropic, AWS Bedrock, Google Vertex AI, Azure OpenAI, and many more). The fastest way to get started is to import the ones you use.Open LLM Configuration → Model Pricing
Click Import Defaults
Pick a Sync behavior

How Pricing Resolves
When a request flows through the gateway, Barndoor finds the right price by checking your rules in this order. The first match wins.| Tier | Use when |
|---|---|
| 1. Provider-specific | You’ve negotiated a custom rate with one specific provider connection (for example one of your Azure deployments). |
| 2. Catalog | The price applies to a whole vendor line — every OpenAI provider, every Bedrock provider, etc. — but you don’t want it to apply across vendors. |
| 3. Organization-wide | The price applies wherever the model name matches, regardless of which provider serves it. The simplest and most common scope. |
| 4. Platform defaults | Barndoor’s curated catalog of market-rate prices. Kicks in as a safety net even if you’ve never imported anything. |
Creating a Pricing Rule Manually
Model pattern
- Exact —
gpt-4o-minimatches only that exact model. - Prefix wildcard —
gpt-4o*matchesgpt-4o,gpt-4o-mini,gpt-4o-2024-08-06, and any other model whose name starts withgpt-4o.
* is supported. Patterns like *-mini, gpt-*-mini, or regex are not.Catalog (optional)
Provider (optional)
Input + output cost per million tokens
When this takes effect

Editing and Scheduling Price Changes
Click the pencil icon on any row to edit. Every save creates a new version of the rule with aneffective_from timestamp — Barndoor never overwrites an existing price in place. That gives you three things at once:
- Past and active versions are an audit trail. They can’t be deleted or modified.
- Scheduled future versions can be canceled or edited from the listing or from the row’s Pricing history.
- Changes are forward-looking. They apply only to requests served after the new version becomes active — they don’t retroactively re-cost historical audit events or top up spending budgets that have already accumulated.
Editing an active price
- Click the pencil icon on the row.
- Adjust the input or output cost.
- Choose Take effect immediately for a normal change, or Schedule for later to pin the new price to a future date and time.
- Optionally fill in Change reason — it shows up in Pricing history so you (or whoever inherits the rule) know why.
- Save. Immediate edits apply on the very next request; scheduled edits activate at the time you chose, with up to ~5 minutes activation precision.
Editing or canceling a scheduled change
Rows with a pending future version display a Scheduled badge (N scheduled if more than one is queued). To change or cancel a scheduled price before it activates, open the Pricing history dialog (clock icon on the row) and use the pencil or trash icon next to the scheduled entry. The trash icon on a scheduled version cancels that change — it does not affect any active or past version.
Model pattern, Catalog, or Provider fields after a rule is created. To change those, create a new rule with the right scope — Barndoor’s resolution order will decide which one wins. Deleting an active rule is not supported; create a new version (or new rule) instead.Reset to Default
If you’ve drifted from Barndoor’s curated default for a model, the row shows a Custom badge and a Reset to default action appears next to it (and inside the Edit dialog). Clicking it creates a new version of the rule whose input and output costs match the current default — Barndoor recordsReset to default as the change reason automatically so it’s clear in the history.
Pricing History
Each row in the listing has a clock icon that opens its Pricing History dialog — a timeline of every version of that rule, newest first. Each entry shows:- The input and output costs at that version.
- The
effective_fromtimestamp. - Who made the change (actor email, when available).
- How the change was made — manual edit, scheduled change, Reset to default, or an automatic sync from Barndoor’s catalog.
- The optional Change reason you (or another admin) entered at the time.
- Audit who changed what, when, and why.
- Cancel a pending scheduled change before it activates — click the trash icon next to a scheduled entry. Active and past entries are immutable.
- Edit a pending scheduled change — click the pencil icon to re-pick the date / time or adjust the price before it goes live.
Keeping Prices in Sync with Barndoor’s Catalog
Barndoor refreshes its default catalog as upstream provider prices change. Each pricing row in your org carries a Sync behavior that decides what happens when one of those refreshes affects a model you’ve imported. You pick a sync behavior when you import defaults, and you can change it later from the Edit dialog.| Sync behavior | What it does |
|---|---|
| Tracking — Prompt me on updates | Imports the default at the moment of import. When Barndoor changes the default afterward, the row gets an Update available badge and the Review updates banner appears at the top of the tab. Apply the update from the banner (or pin the row to your current price). |
| Pinned — I’ll manage it | A fixed price you maintain manually. Barndoor never prompts you about catalog changes for this row. The row shows a Custom badge with a lock icon. |
| Auto-sync — Auto-sync to Barndoor | Barndoor’s defaults flow through automatically — typically within a minute of the catalog updating. The row shows an Auto-sync badge. |
Reviewing updates
When at least one of your tracking rows is out of sync with Barndoor’s current default, a blue Review updates banner appears at the top of the Model Pricing tab. Clicking it opens a dialog listing every affected row with the old vs new default price. From there you can:- Apply the update to one or more rows — Barndoor creates a new version of each accepted rule with the latest default.
- Pin a row instead — switches its sync behavior to I’ll manage it so you stop getting prompted.
Badges in the Pricing Listing
Each row carries one or more badges that summarize its state at a glance.| Badge | Meaning |
|---|---|
| Default | A Barndoor default exists for this pattern, the row’s sync behavior is Prompt me on updates, and your costs match the current default. |
| Custom | A Barndoor default exists, but you’ve either changed the costs or pinned the row to I’ll manage it. A lock icon distinguishes pinned rows. |
| Manual | No Barndoor default exists for this pattern — you created the rule from scratch. |
| Update available | A Prompt me on updates row whose Barndoor default has changed since you imported it. Click Review updates at the top of the tab to apply or pin. |
| Auto-sync | The row’s sync behavior is Auto-sync to Barndoor — Barndoor’s defaults flow through automatically. |
| Scheduled (or N scheduled) | The row has at least one future-dated version waiting to activate. Click the clock icon to open Pricing history and inspect, edit, or cancel it. |
Require Pricing for Model Mappings
The toggle at the top of the Model Pricing tab — Require pricing for model mappings — is a safety net for organizations that want every billable model to have a price set before it can be enabled in a route.
- The Models and Model Routes tabs in LLM Configuration show a No pricing badge next to any model that has no matching rule.
- You can’t enable a route that points at an unpriced model — Barndoor blocks the save with a message explaining what’s missing.
How Pricing Plugs into the Rest of the Platform
| Feature | How it uses pricing |
|---|---|
| Token budgets (LLM Controls) | Doesn’t use pricing. Caps total tokens; independent of pricing. |
| Spending budgets (LLM Controls) | Uses pricing. Each successful request debits (prompt_tokens × input_rate) + (completion_tokens × output_rate). Without matching pricing the spending counter stays at 0 for that model. |
| Per-request audit events | Uses pricing. estimated_cost, input_cost, and output_cost fields are populated on the audit event for every successful LLM request. |
| Reporting → LLM Usage | Uses pricing. Aggregates the per-request estimated_cost recorded on audit events. |
Troubleshooting
Spending budget is always $0 used
Spending budget is always $0 used
`estimated_cost` is missing or zero on a recent audit event
`estimated_cost` is missing or zero on a recent audit event
- The model name in the request didn’t match any pattern (look for trailing-
*wildcard mismatches). - The request resolved to a provider whose provider-specific pricing override has zero rates.
$0, so you’ll see them as missing in some report views.I changed a price but old reports / spend numbers haven't moved
I changed a price but old reports / spend numbers haven't moved
The Model Pricing tab is still showing my old value after a save
The Model Pricing tab is still showing my old value after a save
I scheduled a price change for later but want to cancel it
I scheduled a price change for later but want to cancel it
Two rules match the same model — which one wins?
Two rules match the same model — which one wins?
gpt-4o and a wildcard gpt-4o* both at the org-wide scope), behavior is not guaranteed — the gateway uses the first match it finds. Remove the duplicate or tighten one of the patterns so only one matches each model.Frequently Asked Questions
Does importing defaults stay in sync with provider price changes?
Does importing defaults stay in sync with provider price changes?
- Prompt me on updates (default) — Barndoor flags catalog changes with an Update available badge and a top-of-tab Review updates banner; you apply or pin per row.
- I’ll manage it — Barndoor never changes your prices; you maintain them by hand.
- Auto-sync to Barndoor — Barndoor’s defaults flow through automatically, typically within a minute of a catalog change.
What currency is supported?
What currency is supported?
Can I set different prices for different request types (batch, realtime, fine-tuned, etc.)?
Can I set different prices for different request types (batch, realtime, fine-tuned, etc.)?
gpt-4o-realtime vs gpt-4o-batch) and price each one independently.What if my provider lists prices per 1,000 tokens?
What if my provider lists prices per 1,000 tokens?
$0.0025 per 1K input tokens, enter 2.50 as the input cost per million.Do I need a pricing rule for embedding models too?
Do I need a pricing rule for embedding models too?
0.Can I import only some defaults — or do I have to import everything?
Can I import only some defaults — or do I have to import everything?
Need Help?
Reach out to [email protected] with:- The model name (and provider) you’re trying to price.
- The pattern + costs you’ve configured (a screenshot of the row helps).
- The behavior you’re seeing —
$0cost in reports, budget not debiting, unpriced-model warning, etc.
