# Price book

## Sources

The price book is built from LiteLLM's MIT-licensed price file and checked against each provider's pricing page, with Veqen's own rules for cache writes, tiers, residency, variants and retirements on top. It covers model labs (OpenAI, Anthropic, Google, Mistral, DeepSeek, Qwen, xAI and others), open-model hosts (Together, Fireworks, Groq, Cerebras, DeepInfra, Baseten and others), clouds (Amazon Bedrock, Azure AI Foundry, Databricks, watsonx) and media providers (fal, Replicate, Stability, Black Forest Labs, Runway, ElevenLabs, Deepgram, AssemblyAI). It's published:

- in both SDKs (`veqen/data/prices.json`, `veqen/prices`), so pricing works offline;
- as standalone data packages on [PyPI](https://pypi.org/project/veqen-pricebook/) and [npm](https://www.npmjs.com/package/@veqen/pricebook), with no runtime dependencies or tracking;
- at [/prices.json](/prices.json), with a [changelog](/changelog) and [RSS feed](/changelog.xml);
- as a page for every model at [/models](/models), grouped by provider and by kind.

The cloud ledger re-prices every call with its own copy, so calls from every SDK version are priced the same way; the SDKs price locally with the book they shipped with. The book's version is the date anything in it last changed, and every recorded call stores the version that priced it.

## Use the data without a tracking SDK

Install a dated snapshot when you need a local model-price lookup table:

```bash
pip install veqen-pricebook==2026.10.22
npm install @veqen/pricebook@2026.10.22
```

```python
from veqen_pricebook import load

book = load()
print(book["models"]["openai/gpt-4o"]["rates"])
```

```javascript
import book from '@veqen/pricebook';

console.log(book.models['openai/gpt-4o'].rates);
```

Token rates are USD per million tokens. Missing rates are unavailable data, not zero cost. The packages provide data; the [SDKs](/docs/quickstart) provide the calculation engine for cache, batch, long-context and other billing rules. Installed snapshots stay fixed until you update them. The [public JSON endpoint](/prices.json) follows the deployed price book instead.

See the [package source and release process](https://github.com/Keyveve/veqen-sdks/tree/main/pricebook-packages) and the [tokencost migration guide](/guides/migrate-from-tokencost).

## Kinds of model

Every model has a `kind`, and each kind is billed by what the provider meters:

| Kind | Billed by | Examples |
|---|---|---|
| `text` | Input, output, cached and cache-write tokens | Chat, reasoning and code models, open-weight Llama, Qwen, DeepSeek |
| `embedding` | Input tokens | `text-embedding-3-small`, `voyage-3`, Cohere Embed |
| `realtime` | Text and audio tokens, at separate rates | `gpt-realtime`, Gemini Live |
| `image` | Per image, by size and quality; image tokens when the provider reports them | `gpt-image-1`, FLUX, Imagen, Stable Diffusion |
| `video` | Per second of output, by resolution | Sora, Veo, Runway, Wan, Seedance |
| `speech` | Per character | `tts-1`, ElevenLabs |
| `transcription` | Per second of audio (pages show it per minute) | `whisper-1`, Deepgram Nova, AssemblyAI |
| `rerank` | Per query | Cohere Rerank, Voyage and Jina rerankers |
| `ocr` | Per page | Mistral OCR, Azure Document Intelligence |

A model billed per unit has a `unit`: `image`, `second`, `character`, `query` or `page`. A call reports how many in `units`. A rerank call that reports nothing is one query.

## Rates

Token rates are USD per million tokens:

| Key | Meaning |
|---|---|
| `in` | Input (uncached) |
| `out` | Output, reasoning included |
| `cr` | Cache read |
| `cw` | Cache write (5-minute) |
| `cw1h` | Cache write (1-hour, Anthropic) |
| `ain`, `aout` | Audio input and output, for realtime and audio-capable models |
| `unit` | USD per unit, for models billed per unit |

Modes are `standard`, `batch`, `priority` and `flex`. A mode the provider doesn't list a rate for is derived from the standard rate scaled by that mode's input discount. Long-context tiers appear as `standard>200000` (the threshold varies by model: 128K, 200K and 272K are common): once a prompt (cached tokens included) passes the threshold, the whole call is billed at that tier.

Image and video models can have **variants**, keyed `v:quality/size` or `v:resolution`: `v:hd/1024x1792` for an image, `v:1080p` for a video. A call passes the variant it used (`variant="hd/1024x1792"`); a variant the book doesn't list falls back to the same size at any quality, then to the standard rate. Where a provider reports image tokens (gpt-image), the tokens are the bill and the per-image rate is not added.

Audio tokens on a model without audio rates are billed at its text rates, and cache reads and writes without their own rates at the input rate. A call that used something the model has no rate at all for (tokens on a model billed per second, say) is recorded with no cost rather than a wrong one.

## Matching model names and hosts

Veqen recognizes the names providers, gateways and frameworks report:

- dated snapshots (`gpt-4o-2024-08-06`, `claude-sonnet-4-5-20250929`, `gemini-2.0-flash-001`);
- provider prefixes (`anthropic/claude-sonnet-4.5`, `models/gemini-2.5-pro`, `together_ai/meta-llama/Llama-3.3-70B-Instruct-Turbo`);
- Amazon Bedrock ids (`us.anthropic.claude-sonnet-4-5-20250929-v1:0`, `meta.llama3-3-70b-instruct-v1:0`);
- model ids that contain slashes, as open-model hosts use them (`fireworks/accounts/fireworks/models/...`, `fal/fal-ai/flux/schnell`).

When an OpenAI-compatible client points at another provider, the SDKs read the client's base URL and price the call as that provider: `api.together.xyz` is Together, `api.groq.com` is Groq, `services.ai.azure.com` is Azure AI Foundry, `fal.run` is fal. If the base URL is your own server, pass `provider=` to `wrap()`. A model name that isn't found under the stated provider is looked up across every provider.

Provider aliases include `gemini`, `vertex_ai`, `azure`, `azure_openai`, `azure_ai`, `aws.bedrock`, `together_ai`, `fireworks_ai`, `dashscope` and `grok`.

## Prices the book can't know

Negotiated discounts, committed-use rates and models you run on your own GPUs: set them as [custom prices](/docs/custom-prices). They apply to your organization only.

## Retirements

Models and APIs with announced retirement dates carry them, with the suggested replacement. `veqen scan` and the Models page flag them, and `veqen scan --fail-within 30` can fail CI before a deadline.

## Something wrong?

Email support@veqen-app.com with the model and the provider's pricing page; we'll fix it in the next price-book update.
