Documentation Index
Fetch the complete documentation index at: https://docs.barndoor.ai/llms.txt
Use this file to discover all available pages before exploring further.
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

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

Updating and Resetting Prices
Edit any row to change the costs. Changes take effect immediately on the next request through the gateway.model_pattern, Catalog, or Provider fields after a rule is created. To change those, delete the rule and create a new one.The Default / Custom / Manual badges
Each row in the listing shows a badge under its model pattern that tells you how it relates to Barndoor’s default catalog:| Badge | Meaning |
|---|---|
| Default | Your rule matches Barndoor’s curated default for that pattern and the prices match exactly. |
| Custom | A default exists for that pattern, but you’ve edited the input or output cost. |
| Manual | No default exists for that pattern — you created the rule from scratch. |
Reset to Default
When a row is Custom, a Reset to default action appears next to it (and inside the Edit dialog). Clicking it reverts your input and output costs back to whatever Barndoor’s current default catalog says — useful when you’ve adjusted a price for a one-off experiment and want to roll back.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 | Uses pricing? | Notes |
|---|---|---|
| Token budgets (LLM Controls) | No | Caps total tokens. Independent of pricing. |
| Spending budgets (LLM Controls) | Yes | 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 | Yes | estimated_cost, input_cost, and output_cost fields are populated on the audit event for every successful LLM request. |
| Reporting → LLM Usage | Yes | 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
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?
- Re-import affected rows from the Import Defaults modal (already-imported rows are skipped, but newly-added defaults will become available), or
- Reset to default on a Custom row to snap to the current default, or
- Edit manually with the new price.
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.
