Models & pricing
List the available models and their per-token prices with GET /v1/models, and see exactly how the charge for each call is computed.
Models are billed per token, at prices listed in US dollars per million tokens. Each call is charged from the token counts the model reports in its response, and the amount is deducted from your prepaid balance within seconds.
List models#
GET /v1/models returns every model you can call right now, with its context size, prices and the channel groups that serve it. It needs no API key, and it works with client.models.list() in both the OpenAI and Anthropic SDKs.
curl https://lovelyrouter.com/v1/modelsA trimmed response:
{
"object": "list",
"data": [
{
"id": "claude-sonnet-5.5",
"object": "model",
"type": "model",
"display_name": "Claude Sonnet 5.5",
"created": 1700000000,
"created_at": "2025-01-01T00:00:00Z",
"owned_by": "Anthropic",
"context_length": 1000000,
"pricing": {
"input": 2,
"output": 10,
"cache_read": 0.1,
"cache_write": 2.5,
"unit": "USD per 1M tokens"
},
"groups": ["claude-value"]
},
{
"id": "gpt-6.1-sol",
"object": "model",
"type": "model",
"display_name": "GPT-6.1 Sol",
"created": 1700000000,
"created_at": "2025-01-01T00:00:00Z",
"owned_by": "OpenAI",
"context_length": 1050000,
"pricing": {
"input": 2,
"output": 10,
"cache_read": 0.1,
"cache_write": null,
"unit": "USD per 1M tokens"
},
"groups": ["gpt-value"]
}
],
"has_more": false,
"first_id": "claude-fable-5.1",
"last_id": "gpt-5.6-luna"
}| Field | Meaning |
|---|---|
id | The model id to send. Other spellings also resolve; see Model ids. |
owned_by | The vendor: Anthropic, OpenAI or Google. |
context_length | Maximum context window in tokens. |
pricing.input | Price of uncached input tokens. |
pricing.output | Price of output tokens, including reasoning and thinking tokens. |
pricing.cache_read | Price of input tokens served from the prompt cache. |
pricing.cache_write | Price of input tokens written to the prompt cache. null means cache writes are billed at the input price. |
pricing.unit | Always USD per 1M tokens. |
groups | Channel groups that serve the model. |
created, created_at | Fixed placeholder values, present for SDK compatibility. |
All prices are list prices before the channel group's multiplier. GET /v1beta/models returns the same models in Gemini's shape, without prices.
How a call is charged#
Each call's usage is split into four kinds of token, and each kind is billed at its own price:
| Token kind | Anthropic usage field | OpenAI usage field | Gemini usage field |
|---|---|---|---|
| Uncached input | input_tokens | prompt_tokens minus cached_tokens | promptTokenCount minus cachedContentTokenCount |
| Cache read | cache_read_input_tokens | prompt_tokens_details.cached_tokens | cachedContentTokenCount |
| Cache write | cache_creation_input_tokens | not reported | not reported |
| Output | output_tokens (includes thinking) | completion_tokens (includes reasoning) | candidatesTokenCount + thoughtsTokenCount |
The charge is:
charge = ( uncached_input × input_price
+ cache_read × cache_read_price
+ cache_write × cache_write_price
+ output × output_price ) ÷ 1,000,000 × multiplierThe multiplier is the one of the channel group that served the call, reported in the x-lovely-group response header. A model can carry its own multiplier, which then replaces the group's. Every group serving models today bills at ×1.00, so the listed prices are what you pay. Charges are rounded up to the nearest $0.000001.
For example, one turn of an agent session on claude-sonnet-5.5:
| Token kind | Tokens | Price per 1M | Cost |
|---|---|---|---|
| Uncached input | 1,200 | $2.00 | $0.002400 |
| Cache read | 30,000 | $0.10 | $0.003000 |
| Cache write | 2,000 | $2.50 | $0.005000 |
| Output | 800 | $10.00 | $0.008000 |
| Total | $0.018400 |
Without the cache, the same 33,200 input tokens would have cost $0.066400. See Prompt caching to keep cache hits high.
Image models#
Image models (gpt-image-*) are billed per image, not per token. In GET /v1/models their pricing is per_image (US dollars per image) instead of token prices. See Images pricing.
What is not charged#
- Requests rejected before reaching a model: invalid key, model not allowed, insufficient balance, rate limit, invalid JSON.
- Requests that fail on every channel, and failed attempts that were retried on another channel. You pay only for the attempt that answered.
POST /v1/messages/count_tokensand Gemini:countTokens.- Listing models.
Cancelled and interrupted streams#
If you close a stream early, you pay for the tokens produced up to that point. Input uses the count the stream reported, or about four characters per token of your request if it reported none. Output is the larger of the count reported so far and about four characters per token of the text already delivered to you.
A stream that the gateway cuts off because the model stopped responding is billed the same way, for what was delivered. See Streaming.
Where to see charges#
Every call appears in Logs with its token counts and charge. The marketplace shows each model's price per channel group with the multiplier already applied, plus live availability. Balance and top-ups are covered in Credits & billing; usage reports in Usage & logs.
Live price table#
| Model | Context | Input | Output | Cache read | Cache write |
|---|---|---|---|---|---|
Live from GET /v1/models · USD per 1M tokens