Pricing & usage
How each request is billed per input and output token, the rates for long prompts, caching and reasoning, and where you see your usage.
Die Dokumentation ist auf Englisch.
You pay per request, from a prepaid balance in US dollars. There is no subscription. Each lane of each model has a price per input token and a price per output token. You find them on Models (per million tokens) and in GET /v1/models (per token).
How a request is billed
After each request the gateway reads the token counts from the response's usage and charges:
cost = input tokens × input price + output tokens × output priceEach of the two parts is rounded up to the next micro-dollar ($0.000001). Your balance is kept in micro-dollars, so nothing else is rounded.
Example
openai/gpt-6-astra costs $10 per million input tokens and $50 per million output tokens at the time of writing. A request with 1,200 input tokens and 350 output tokens costs 1,200 × $0.00001 + 350 × $0.00005 = $0.012 + $0.0175 = $0.0295.
Rounding: 137 input tokens at $2.664 per million is 364.968 micro-dollars, billed as 365 ($0.000365).
What counts as input and output
Input tokens are everything the model reads: the messages, the system prompt, tool definitions, images, and tokens read from or written to a prompt cache. Output tokens are everything it writes, tool calls included. Reasoning (thinking) tokens count as output: the model reports them in its output tokens.
Long prompts
Some models charge more for long prompts, as their makers do. When the input of a request is above the model's threshold, the higher rate applies to the whole request: to all input and all output tokens. These are the models with such a rate:
Show the 38 models with a long-prompt rate
| Model | Higher rate for long prompts |
|---|---|
anthropic/claude-haiku-5.5 | Above 100K: input 5×, output 5× |
bytedance/doubao-seed-2.0-code-preview | Above 32K: input 1.5×, output 1.5× · Above 128K: input 3×, output 3× |
bytedance/doubao-seed-2.0-lite | Above 32K: input 1.5×, output 1.5× · Above 128K: input 3×, output 3× |
bytedance/doubao-seed-2.0-mini | Above 32K: input 2×, output 2× · Above 128K: input 4×, output 4× |
bytedance/doubao-seed-2.0-pro | Above 32K: input 1.5×, output 1.5× · Above 128K: input 3×, output 3× |
google/gemini-3-pro-preview | Above 200K: input 2×, output 1.5× |
google/gemini-3.1-pro-preview | Above 200K: input 2×, output 1.5× |
minimax/minimax-m3 | Above 512K: input 2×, output 2× |
openai/gpt-5.4 | Above 272K: input 2×, output 1.5× |
openai/gpt-5.4-pro | Above 272K: input 2×, output 1.5× |
openai/gpt-5.5 | Above 272K: input 2×, output 1.5× |
openai/gpt-5.5-pro | Above 272K: input 2×, output 1.5× |
openai/gpt-5.6-luna | Above 272K: input 2×, output 1.5× |
openai/gpt-5.6-sol | Above 272K: input 2×, output 1.5× |
openai/gpt-5.6-terra | Above 272K: input 2×, output 1.5× |
openai/gpt-6-astra | Above 272K: input 2×, output 1.5× |
openai/gpt-6-luna | Above 272K: input 2×, output 1.5× |
openai/gpt-6-sol | Above 272K: input 2×, output 1.5× |
openai/gpt-6.1-sol | Above 272K: input 2×, output 1.5× |
openai/gpt-6.1-terra | Above 272K: input 2×, output 1.5× |
openai/gpt-6.2-astra | Above 272K: input 2×, output 1.5× |
openai/gpt-6.2-sol | Above 272K: input 2×, output 1.5× |
qwen/qwen-flash | Above 256K: input 5×, output 5× |
qwen/qwen-plus | Above 256K: input 3×, output 3× · With reasoning: up to 256K: input 1×, output 3.33×; above 256K: input 3×, output 10× |
qwen/qwen3-vl-plus | Above 32K: input 1.5×, output 1.5× · Above 128K: input 3×, output 3× |
qwen/qwen3.5-plus | Above 256K: input 1.25×, output 1.25× |
qwen/qwen3.6-plus | Above 256K: input 4×, output 2× |
qwen/qwen3.7-plus | Above 256K: input 3×, output 3× |
x-ai/grok-4.20-non-reasoning | Above 200K: input 2×, output 2× |
x-ai/grok-4.20-reasoning | Above 200K: input 2×, output 2× |
x-ai/grok-4.3 | Above 200K: input 2×, output 2× |
x-ai/grok-4.5 | Above 200K: input 2×, output 2× |
x-ai/grok-4.6 | Above 200K: input 2×, output 2× |
x-ai/grok-4.7 | Above 200K: input 2×, output 2× |
x-ai/grok-build-0.1 | Above 200K: input 2×, output 2× |
z-ai/glm-4.5-air | Above 32K: input 1.5×, output 1.33× |
z-ai/glm-5 | Above 32K: input 1.5×, output 1.2× |
z-ai/glm-5.1 | Above 32K: input 1.33×, output 1.17× |
Prompt caching
Reading from a prompt cache is billed at the normal input rate for now.
Writing to a prompt cache, as reported in the usage of /v1/messages, is billed at a multiple of the input rate: 1.25× for the 5-minute cache and 2× for the 1-hour cache, unless the model has its own factors.
Reasoning
Reasoning tokens are billed as output tokens. A few models charge a different rate when they reason; the table above shows them.
What you don't pay for
- Requests the gateway refuses before they reach a model: a missing or invalid key, too little credit, an unknown model, a model the key may not use, and so on.
- Attempts on a route that failed before you received any data. When the gateway falls back to another route, you pay once.
- A stream that fails before any output. On
/v1/messagesthis holds only untilmessage_starthas arrived: from then on, the input tokens it reports are billed. GET /v1/models,GET /v1/creditsandGET /v1/key.
Requests refused because of the model, the key's budget or model list, or your balance still appear in Usage with a cost of $0, so you can see what went wrong. Requests refused for the key itself (missing, invalid or expired) or for the rate limit don't appear there.
When usage is missing
If a response or a stream ends without usage, the gateway estimates the tokens from the length of the text, at about four characters per token, and bills that.
Balance and credits
Add credits on Credits, from €10. You pay in euros; we convert to US dollars at the ECB reference rate minus a small currency buffer, and show the amount before you pay. VAT is added where it applies. Every payment gets an invoice under Invoices.
The balance belongs to your organization. All of its keys and the playground spend from it.
When the balance is zero or below, requests fail with 402 insufficient_credits. A request also fails up front when its prompt alone would cost more than your balance. Because the cost is known only after the answer, the balance can end slightly below zero after the last request.
We email you when your balance drops below $1. You can also turn on automatic top-up with a saved card on Credits. For refunds and unused credit, the Terms apply.
Where you see your usage
| Where | What you see |
|---|---|
| Usage | Cost, requests, input and output tokens, errors and latency per period, by model and by key, with a request log and CSV export. |
usage in each response | The token counts we bill on. |
GET /v1/credits | The balance, total credits and total usage of your organization. |
GET /v1/key | Spend and budget of the key you call it with. |
Responses don't include the cost itself. Use Usage or the endpoints above.