Pricing
How Ruvicode billing works: live per-token rates for chat models, per-image prices for image models, and lower rates for cached prompt tokens.
How you are charged for requests, and how cached prompt tokens cost less.
How billing works
You are billed per request, in USD. Chat models are billed on exact token counts: every chat model lists its live $/1M token rates for input, output, and cached input. Image models are billed per image returned. The amount for each request is deducted from your wallet balance. There is no credit conversion and no monthly fee.
Every billed chat response reports the exact charge for that request in usage.cost, in USD. Streaming responses carry it in the final usage chunk, and non-streaming responses also send it as an X-Cost header. Image responses carry it as cost and in the X-Cost header. The same figure appears in your dashboard usage history.
Topping up
Two ways to add balance:
- USDC on Base. Your dashboard shows a deposit address unique to your account. Deposits start at $0.01 and are credited automatically after on-chain confirmation.
- QRIS in IDR. Pay in Rupiah from any bank or e-wallet app on the top-up page, at the exchange rate shown there. Credit lands automatically as soon as the payment clears. You can also top up from our Telegram bot after connecting your account in Settings.
Balance never expires and there is no fee for holding it.
Live rates
Prices come from a pricing engine that refreshes continuously. The rate on each model page is the rate you pay on the next request, with the one exception below. See the models catalog for current input, output, and cached input rates per model.
When a request is rerouted
When the provider capacity behind a listed rate is busy, your request is rerouted to another provider instead of failing. If serving it there costs more than the listed rate would charge, the request is billed at that real provider cost plus the same margin the model's listed rate carries. The margin stops at the official provider price for the same request. In the rare case where the provider itself charged more than that official price, the request is billed at exactly what it cost, with no margin. A request that costs less than the listed rate always pays the listed rate.
If no provider can take a model at that moment, or the provider does not start answering within two minutes, the request is served by a backup provider instead of failing. It is billed at that provider's price plus the model's standard margin, never more than the official provider price for the same request, so it can be higher than the listed rate. Turbo models are always served this way, so their rate follows that provider's price. Every response reports its exact charge.
The exact charge is always reported in usage.cost (plus the X-Cost header on non-streaming calls), and your dashboard shows the same figure.
Long prompts
Some models can have a long-context rate, set by the official provider price. While a model is billed at it, a request whose prompt, cached tokens included, is longer than the threshold is billed at that rate as a whole: input, output, and cached input all move to the higher price, and any discount stays the same share of it. The model page shows the threshold and the long-context rates whenever they apply. Requests at or under the threshold pay the normal rate.
Cached input tokens
Workloads that resend the same prompt prefix on every turn (coding agents, chat with long history, repeated system prompts) get a lower price automatically. When a request reuses a prompt prefix that was already processed, the cached portion of the prompt is billed at a cache read rate instead of the full input rate. Cache reads are typically 5-10x cheaper than input tokens.
Caching is automatic. Prefixes are matched for you, there is no parameter to set and nothing to enable. If a request has no repeated prefix, every prompt token is billed at the normal input rate, and models without a cached input price always bill at the normal input rate.
Model pages show a "Cached input" rate when the model supports it. The cost calculator lets you model the effect by setting the share of your prompt served from cache.
Clients can read the cache split from the usage object in each response:
| Field | Description |
|---|---|
prompt_cache_hit_tokens | Prompt tokens served from cache |
cached_tokens | Same count, nested in prompt_tokens_details |
prompt_tokens | Full prompt token count, including cached tokens |
{
"usage": {
"prompt_tokens": 5075,
"completion_tokens": 120,
"total_tokens": 5195,
"prompt_cache_hit_tokens": 4900,
"prompt_tokens_details": {
"cached_tokens": 4900
}
}
}See Chat Completions for the full response shape.
Image models
Image generation and image edits are priced per image (images are 1K resolution). You pay only for images that come back: if fewer images are returned than you asked for, or the request is rejected by the content policy, the missing images are not charged. Current prices are on each image model's page in the models catalog. See Images for the API.
Cost tracking
Your dashboard shows per-request costs, token counts or image counts, and how much of each prompt was served from cache. Usage history is exportable, and each API key can carry a spend limit to cap runaway costs.