> ## Documentation Index
> Fetch the complete documentation index at: https://impossibl.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Supported models and pricing

> Every model the gateway serves, how each request is priced against your credit balance, and how to top up with a hosted Stripe invoice in one call.

Pick a model with the `provider/model` convention and pass it as the `model`
field. The live, authoritative list (with current pricing) is always at
`GET /v1/models`.

## Available models

### Audio transcription

| Model                   | Endpoint                        | Price                   |
| ----------------------- | ------------------------------- | ----------------------- |
| `openai/gpt-transcribe` | `POST /v1/audio/transcriptions` | \$0.0045 / audio minute |

See [Audio transcription](/docs/audio-transcription) for a copy-paste file upload and
streaming example.

### Image generation

`openai/gpt-image-2` generates images via `POST /v1/images/generations`, billed
per token at the rates in the table below (text input plus image output tokens).
See [Image generation](/docs/image-generation) for the request shape and options.

### Token-priced models

| Model                              | Context   | Input / 1M | Output / 1M |
| ---------------------------------- | --------- | ---------- | ----------- |
| `openai/gpt-5.6-sol`               | 1050K     | \$5.00     | \$30.00     |
| `openai/gpt-5.6-luna`              | 1050K     | \$1.00     | \$6.00      |
| `openai/gpt-5.6-terra`             | 1050K     | \$2.50     | \$15.00     |
| `openai/gpt-image-2`               | 32K       | \$5.00     | \$30.00     |
| `openai/gpt-5.5`                   | 1050K     | \$5.00     | \$30.00     |
| `openai/gpt-5.5-pro`               | 1050K     | \$30.00    | \$180.00    |
| `openai/gpt-5.4`                   | 1050K     | \$2.50     | \$15.00     |
| `openai/gpt-5.4-mini`              | 400K      | \$0.75     | \$4.50      |
| `openai/gpt-5.4-nano`              | 400K      | \$0.20     | \$1.25      |
| `openai/gpt-5.4-pro`               | 1050K     | \$30.00    | \$180.00    |
| `openai/gpt-5.3-codex`             | 400K      | \$1.75     | \$14.00     |
| `openai/gpt-5.1`                   | 400K      | \$1.25     | \$10.00     |
| `openai/gpt-5.2`                   | 400K      | \$1.75     | \$14.00     |
| `openai/gpt-5.2-codex`             | 400K      | \$1.75     | \$14.00     |
| `openai/gpt-5.1-codex`             | 400K      | \$1.25     | \$10.00     |
| `openai/gpt-5.1-codex-mini`        | 400K      | \$0.25     | \$2.00      |
| `openai/gpt-chat-latest`           | 400K      | \$5.00     | \$30.00     |
| `openai/gpt-5`                     | 400K      | \$1.25     | \$10.00     |
| `openai/gpt-5-pro`                 | 400K      | \$15.00    | \$120.00    |
| `openai/gpt-5-codex`               | 400K      | \$1.25     | \$10.00     |
| `openai/gpt-5-mini`                | 400K      | \$0.25     | \$2.00      |
| `openai/gpt-5-nano`                | 400K      | \$0.05     | \$0.40      |
| `openai/gpt-4.1`                   | 1M        | \$2.00     | \$8.00      |
| `openai/gpt-4.1-mini`              | 1M        | \$0.40     | \$1.60      |
| `openai/gpt-4.1-nano`              | 1M        | \$0.10     | \$0.40      |
| `openai/gpt-4o`                    | 128K      | \$2.50     | \$10.00     |
| `openai/gpt-4o-mini`               | 128K      | \$0.15     | \$0.60      |
| `openai/gpt-4-turbo`               | 128K      | \$10.00    | \$30.00     |
| `openai/gpt-3.5-turbo`             | 16K       | \$0.50     | \$1.50      |
| `openai/o3`                        | 200K      | \$2.00     | \$8.00      |
| `openai/o3-mini`                   | 200K      | \$1.10     | \$4.40      |
| `openai/o4-mini`                   | 200K      | \$1.10     | \$4.40      |
| `openai/o1`                        | 200K      | \$15.00    | \$60.00     |
| `anthropic/claude-opus-5`          | 1M        | \$5.00     | \$25.00     |
| `anthropic/claude-fable-5`         | 1M        | \$10.00    | \$50.00     |
| `anthropic/claude-opus-4-8`        | 1M        | \$5.00     | \$25.00     |
| `anthropic/claude-opus-4-7`        | 1M        | \$5.00     | \$25.00     |
| `anthropic/claude-opus-4-6`        | 1M        | \$5.00     | \$25.00     |
| `anthropic/claude-sonnet-5`        | 1M        | \$3.00     | \$15.00     |
| `anthropic/claude-sonnet-4-6`      | 1M        | \$3.00     | \$15.00     |
| `anthropic/claude-haiku-4-5`       | 200K      | \$1.00     | \$5.00      |
| `anthropic/claude-opus-4-5`        | 200K      | \$5.00     | \$25.00     |
| `anthropic/claude-sonnet-4-5`      | 200K      | \$3.00     | \$15.00     |
| `google/gemini-3.6-flash`          | 1048.576K | \$1.50     | \$7.50      |
| `google/gemini-3.5-flash`          | 1M        | \$1.50     | \$9.00      |
| `google/gemini-3.5-flash-lite`     | 1048.576K | \$0.30     | \$2.50      |
| `google/gemini-3.1-pro-preview`    | 1M        | \$2.00     | \$12.00     |
| `google/gemini-3.1-flash-lite`     | 1M        | \$0.25     | \$1.50      |
| `google/gemini-2.5-pro`            | 1M        | \$1.25     | \$10.00     |
| `google/gemini-2.5-flash`          | 1M        | \$0.30     | \$2.50      |
| `google/gemini-2.5-flash-lite`     | 1M        | \$0.10     | \$0.40      |
| `xai/grok-4.5`                     | 500K      | \$2.00     | \$6.00      |
| `xai/grok-4.3`                     | 1M        | \$1.25     | \$2.50      |
| `xai/grok-4.20-0309-reasoning`     | 1M        | \$1.25     | \$2.50      |
| `xai/grok-4.20-0309-non-reasoning` | 1M        | \$1.25     | \$2.50      |
| `xai/grok-4.20-multi-agent-0309`   | 1M        | \$1.25     | \$2.50      |
| `xai/grok-build-0.1`               | 256K      | \$1.00     | \$2.00      |
| `meta/llama-3.3-70b`               | 128K      | \$0.71     | \$0.71      |
| `mistral/mistral-large-3`          | 128K      | \$0.50     | \$1.50      |
| `microsoft/phi-4`                  | 16K       | \$0.125    | \$0.50      |
| `deepseek/deepseek-v4-flash`       | 1M        | \$0.19     | \$0.51      |
| `deepseek/deepseek-v4-pro`         | 1M        | \$1.74     | \$3.48      |
| `deepseek/deepseek-v3-2`           | 163.84K   | \$0.58     | \$1.68      |
| `deepseek/deepseek-v3-2-speciale`  | 163.84K   | \$0.58     | \$1.68      |
| `zai/glm-5.2`                      | 1M        | \$1.40     | \$4.40      |
| `zai/glm-5.1`                      | 200K      | \$1.40     | \$4.40      |
| `zai/glm-5`                        | 200K      | \$1.00     | \$3.20      |
| `zai/glm-5-turbo`                  | 200K      | \$1.20     | \$4.00      |
| `zai/glm-4.7`                      | 200K      | \$0.60     | \$2.20      |
| `zai/glm-4.6`                      | 200K      | \$0.60     | \$2.20      |
| `zai/glm-4.5`                      | 128K      | \$0.60     | \$2.20      |
| `zai/glm-4.5-air`                  | 128K      | \$0.20     | \$1.10      |
| `moonshotai/kimi-k3`               | 1048.576K | \$3.00     | \$15.00     |
| `qwen/qwen3.7-max`                 | 1048.576K | \$2.50     | \$7.50      |
| `qwen/qwen3.7-plus`                | 1048.576K | \$0.40     | \$1.60      |
| `qwen/qwen3.6-flash`               | 1048.576K | \$0.25     | \$1.50      |
| `qwen/qwen3.8-max-preview`         | 1048.576K | \$2.50     | \$7.50      |
| `xiaomi/mimo-v2.5`                 | 1024K     | \$0.14     | \$0.28      |
| `minimaxai/minimax-m3`             | 524.3K    | \$0.30     | \$1.20      |
| `tencent/hy3`                      | 262.144K  | \$0.20     | \$0.80      |
| `cerebras/gpt-oss-120b`            | 128K      | \$0.35     | \$0.75      |
| `cerebras/zai-glm-4.7`             | 128K      | \$2.25     | \$2.75      |
| `cerebras/gemma-4-31b`             | 128K      | \$0.99     | \$1.49      |
| `groq/gpt-oss-120b`                | 128K      | \$0.15     | \$0.60      |
| `groq/gpt-oss-20b`                 | 128K      | \$0.075    | \$0.30      |
| `groq/llama-3.3-70b-versatile`     | 128K      | \$0.59     | \$0.79      |
| `groq/llama-3.1-8b-instant`        | 128K      | \$0.05     | \$0.08      |
| `fireworks/glm-5.2`                | 1040K     | \$1.40     | \$4.40      |
| `fireworks/glm-5.2-fast`           | 1040K     | \$2.10     | \$6.60      |
| `fireworks/qwen3.7-plus`           | 262.144K  | \$0.40     | \$1.60      |
| `fireworks/gpt-oss-120b`           | 128K      | \$0.15     | \$0.60      |
| `fireworks/gpt-oss-20b`            | 128K      | \$0.07     | \$0.30      |
| `thinkingmachines/inkling`         | 65.536K   | \$1.87     | \$4.68      |
| `thinkingmachines/inkling-256k`    | 262.144K  | \$3.74     | \$9.36      |

Token prices are USD per 1M tokens. More providers and models are added over time.
`anthropic/claude-sonnet-5` is currently promo-priced at **$2.00 / $10.00** (through
2026-08-31) — `GET /v1/models` always returns the effective price you're billed at.

Fireworks also supports serverless passthrough for any public serverless model in the
Fireworks catalog. Use either `fireworks/<model-slug>` or the full
`fireworks/accounts/fireworks/models/<model-slug>` id. Unlisted passthrough models
are billed at the conservative fallback price configured in the gateway.

## Credits

Usage is billed from a **prepaid credit balance**. Credits are denominated in
**micro-USD**:

* **1 credit = $0.000001**, so **$1.00 = 1,000,000 credits**
* Buying $10 in credits adds 10,000,000 credits. The fixed 5% platform fee is
  $0.50, making the pre-tax total \$10.50
* New accounts get a signup bonus so the first call works immediately

## How a request is priced

```
cost_credits = ⌈ input_tokens × input_price + output_tokens × output_price ⌉
```

where `input_price` / `output_price` are the per-1M-token prices above. Provider
usage is billed at the provider's list price with no usage markup
(`PRICE_MARKUP=1.0`). Because a credit is one micro-USD, the "per 1M" division
cancels: `tokens × price` is already micro-USD. The amount is rounded **up**,
deducted atomically when the request finishes, and recorded in the usage ledger
(`GET /v1/usage`).

Some models carry more than the two base rates, and the formula extends the same
way — each token class times its own rate, summed, rounded up once.
`GET /v1/models` reports every rate that applies to a model:

* `audio_input_per_mtok_usd` — audio input tokens priced above the text rate
  (see [Audio & video input](/docs/audio-video#billing))
* `cached_input_per_mtok_usd` / `cache_write_per_mtok_usd` — prompt-cache reads
  and writes
* `context_price_tiers` — long-context brackets: once the prompt crosses a
  tier's threshold, its rates apply to the request

Audio transcription uses duration instead:

```
cost_credits = ⌈ audio_seconds ÷ 60 × 0.0045 × 1,000,000 ⌉
```

The gateway prefers duration usage reported by OpenAI and otherwise reads the
uploaded audio file's duration. It charges only after the transcription completes
successfully.

<Note>
  Example — `gpt-4o-mini`, 11 input + 3 output tokens:
  `⌈11 × 0.15 + 3 × 0.60⌉ = ⌈3.45⌉ = 4 credits` (\$0.000004).
</Note>

For self-hosted deployments, `PRICE_MARKUP` multiplies this provider-usage
formula to set a margin. AI API production keeps it at `1.0`. The separate fixed
5% platform fee applies only when prepaid credits are purchased.

If your balance is empty, model endpoints return `402` (see [Errors](/docs/errors)).
Check your balance with `GET /v1/account`.

<Note>
  Requests routed through your own provider credential ([BYOK](/docs/byok)) skip this
  formula entirely — they're billed 0 credits, since the provider charges you
  directly.
</Note>

## Topping up

Buy credits with a hosted Stripe Invoice:

```bash theme={null}
curl -X POST https://api.impossibl.com/v1/billing/invoice \
  -H "Authorization: Bearer imp-rt-..." \
  -H 'content-type: application/json' \
  -d '{"amount_usd": 10}'
```

```json theme={null}
{
  "invoice_url": "https://invoice.stripe.com/i/...",
  "invoice_id": "in_...",
  "credit_amount_cents": 1000,
  "platform_fee_cents": 50,
  "invoice_amount_cents": 1050
}
```

Open `invoice_url` and pay. Credits are added automatically once the invoice is
paid, and Stripe retries cannot double-credit them. The minimum top-up is \*\*$5**,
and fractional amounts are rounded down to a whole dollar. A fixed 5% platform
fee is added to the net credit amount, so $10 of credits has a $0.50 fee and
costs $10.50 before tax. The invoice has a single `Impossible Credits` line item
covering the credits and fee. Stripe Tax adds VAT or sales tax on top when
enabled.

`GET /v1/billing` shows your balance, the minimum top-up, the fixed platform fee
rate, and the provider-usage multiplier.
