NouveauVoie Eco désormais sur 91 modèles : le même modèle, moins cher

Devise

Vous rechargez toujours en euros. Les autres devises sont affichées au taux du jour de la BCE. Taux de référence de la BCE

Se connecterCommencer

Documentationv1

Menu de la documentationPricing & usage

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.

La documentation est en anglais.

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:

Formula
cost = input tokens × input price + output tokens × output price

Each 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
ModelHigher rate for long prompts
anthropic/claude-haiku-5.5Above 100K: input 5×, output 5×
bytedance/doubao-seed-2.0-code-previewAbove 32K: input 1.5×, output 1.5× · Above 128K: input 3×, output 3×
bytedance/doubao-seed-2.0-liteAbove 32K: input 1.5×, output 1.5× · Above 128K: input 3×, output 3×
bytedance/doubao-seed-2.0-miniAbove 32K: input 2×, output 2× · Above 128K: input 4×, output 4×
bytedance/doubao-seed-2.0-proAbove 32K: input 1.5×, output 1.5× · Above 128K: input 3×, output 3×
google/gemini-3-pro-previewAbove 200K: input 2×, output 1.5×
google/gemini-3.1-pro-previewAbove 200K: input 2×, output 1.5×
minimax/minimax-m3Above 512K: input 2×, output 2×
openai/gpt-5.4Above 272K: input 2×, output 1.5×
openai/gpt-5.4-proAbove 272K: input 2×, output 1.5×
openai/gpt-5.5Above 272K: input 2×, output 1.5×
openai/gpt-5.5-proAbove 272K: input 2×, output 1.5×
openai/gpt-5.6-lunaAbove 272K: input 2×, output 1.5×
openai/gpt-5.6-solAbove 272K: input 2×, output 1.5×
openai/gpt-5.6-terraAbove 272K: input 2×, output 1.5×
openai/gpt-6-astraAbove 272K: input 2×, output 1.5×
openai/gpt-6-lunaAbove 272K: input 2×, output 1.5×
openai/gpt-6-solAbove 272K: input 2×, output 1.5×
openai/gpt-6.1-solAbove 272K: input 2×, output 1.5×
openai/gpt-6.1-terraAbove 272K: input 2×, output 1.5×
openai/gpt-6.2-astraAbove 272K: input 2×, output 1.5×
openai/gpt-6.2-solAbove 272K: input 2×, output 1.5×
qwen/qwen-flashAbove 256K: input 5×, output 5×
qwen/qwen-plusAbove 256K: input 3×, output 3× · With reasoning: up to 256K: input 1×, output 3.33×; above 256K: input 3×, output 10×
qwen/qwen3-vl-plusAbove 32K: input 1.5×, output 1.5× · Above 128K: input 3×, output 3×
qwen/qwen3.5-plusAbove 256K: input 1.25×, output 1.25×
qwen/qwen3.6-plusAbove 256K: input 4×, output 2×
qwen/qwen3.7-plusAbove 256K: input 3×, output 3×
x-ai/grok-4.20-non-reasoningAbove 200K: input 2×, output 2×
x-ai/grok-4.20-reasoningAbove 200K: input 2×, output 2×
x-ai/grok-4.3Above 200K: input 2×, output 2×
x-ai/grok-4.5Above 200K: input 2×, output 2×
x-ai/grok-4.6Above 200K: input 2×, output 2×
x-ai/grok-4.7Above 200K: input 2×, output 2×
x-ai/grok-build-0.1Above 200K: input 2×, output 2×
z-ai/glm-4.5-airAbove 32K: input 1.5×, output 1.33×
z-ai/glm-5Above 32K: input 1.5×, output 1.2×
z-ai/glm-5.1Above 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/messages this holds only until message_start has arrived: from then on, the input tokens it reports are billed.
  • GET /v1/models, GET /v1/credits and GET /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

WhereWhat you see
UsageCost, 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 responseThe token counts we bill on.
GET /v1/creditsThe balance, total credits and total usage of your organization.
GET /v1/keySpend and budget of the key you call it with.

Responses don't include the cost itself. Use Usage or the endpoints above.