Pricing
OpenRouter's price plus OpenRouter's 5% platform fee, and how each request is held and charged.
A model's price is OpenRouter's price plus OpenRouter's 5% platform fee. Deference adds no markup. You pay per request, with no subscription.
Model prices
Each model has a price in dollars per million tokens for input and for output, and separate prices for cached input read and written. Some models also charge per request or per image. Models and GET /v1/models show the prices you pay, fee included.
What a request costs
| Tokens | Charged at |
|---|---|
| Input | The input price |
| Input read from cache | The cache read price |
| Input written to cache | The cache write price |
| Output, reasoning included | The output price |
When the provider reports the cost itself, as it does for chat completions, embeddings and images, you pay that cost plus OpenRouter's 5% platform fee. Deference adds no markup. Costs round up once, to a millionth of a dollar.
How a request is charged
| Step | What happens |
|---|---|
| Hold | Before the request runs, Deference holds an estimated cost for the prompt and the tokens the model's chat template adds, reserved output and any per-request price |
| Charge | When the response ends, the hold is released and the measured cost is charged |
| Final | The cost is then checked against the provider's record. Until then, Activity marks the cost as an estimate |
Without an output cap, Chat Completions and legacy Completions that are not eligible for free credit reserve at most 32,768 output tokens. They reserve the model's maximum if lower, or 8,192 tokens when that maximum is unknown. That reservation is sent upstream as max_tokens, so it caps the provider. Messages and Responses reserve the model's full maximum output, and return 400 output_cap_required when the model publishes no maximum. Deference does not add an output cap on Messages or Responses.
Set an explicit output cap to limit the reply and reduce the hold. Use max_tokens for Messages and legacy Completions, max_completion_tokens or max_tokens for Chat Completions, or max_output_tokens for Responses.
Some requests hold more:
- Each web search step a request allows is held again, with room for the results it carries forward.
- A file, or an image or video given as a URL, is held at the larger of the text estimate and the model's context window, or 1,000,000 tokens when that window is unknown.
- Image generation holds an amount for each requested image. A reported cost is final, because the response has no generation id. A success that reports no cost stays unresolved, and the hold stays reserved.
The hold is an estimate. A request can cost more than its hold, for instance when the prompt tokenizes more densely than estimated or a provider bills output past the cap it was sent. The difference is charged from the rest of your credit balance, within the key's limit. Free credit pays no more than it held, and no request takes your balance or free credit below zero.
Failed and cancelled requests
- A request that fails before the model runs costs nothing.
- A stream that fails partway is charged the cost the provider reports, plus OpenRouter's 5% platform fee. Deference adds no markup. Token counts with a generation id are a provisional estimate. Anything else does not charge the hold.
- If you disconnect during a stream, the tokens the model produced are charged.
- A non-streamed text call has a 15-minute gateway deadline. The HTTP client's 5-minute header or body timeout can end it sooner. Image generation has a 120-second deadline. Each non-streamed timeout returns
504 upstream_timeout, charges nothing yet, and keeps the hold reserved, because the provider may still have run the request. Activity marks it estimated and under review, and the charge may be corrected once the provider's cost is known. - Requests whose cost has no ceiling are refused with a 400 and cost nothing: search through X, audio input, and models that bill per search or per song.
See what you spent
Non-streamed responses carry x-deference-cost, the cost in micro-dollars (1,000,000 is $1). Activity lists each request with its tokens and cost, and Usage totals them by model, key or client.