The True Cost of an AI API: Token Prices vs Hidden Fees
The hidden costs of LLM APIs
When you compare LLM API pricing, the per-token rate is only part of the story. A model that costs $3 per million tokens on paper can end up costing significantly more once you account for:
- Credit top-up fees (5-15% on some platforms)
- Token markup (some gateways add margin on top of vendor pricing)
- Rate limit penalties (paying for higher tiers to avoid throttling)
- Latency costs (slower responses mean more compute time)
- Fallback costs (when a model fails, you pay for the retry)
- Context bloat (system prompts and conversation history add up)
This guide breaks down each hidden cost and shows how to calculate your true API bill.
1. Credit top-up fees
Some platforms charge a fee when you add credits to your account. This is effectively a surcharge on your API spending.
| Platform | Top-up fee | Effective surcharge | |---|---|---| | OpenRouter | 5.5% | $5.50 per $100 spent | | Riven | 0% | $0 | | Direct provider (OpenAI, Anthropic) | 0% | $0 |
Example: If you spend $1,000/month on API calls:
- OpenRouter: $1,000 + $55 top-up fee = $1,055 actual cost
- Riven: $1,000 (no top-up fee)
- Difference: $55/month = $660/year
2. Token markup
Some gateways add a markup on top of the vendor's list price. This can range from 5% to 50% depending on the platform.
| Platform | Markup | On a $3/$15 model | |---|---|---| | OpenRouter | 0% (vendor list) | $3/$15 | | Riven | 0% (vendor list) | $3/$15 | | Some managed gateways | 10-30% | $3.30-3.90 / $16.50-19.50 |
Example: Using Claude Sonnet 4.6 ($3/$15 per million tokens) at 1M tokens/day:
- At vendor list: $3,000 + $15,000 = $18,000/month
- With 20% markup: $3,600 + $18,000 = $21,600/month
- Difference: $3,600/month = $43,200/year
3. Rate limit penalties
Most providers tier their rate limits by spending level. If you hit rate limits, you either:
- Wait (latency penalty)
- Upgrade to a higher tier (cost penalty)
- Use multiple keys (complexity penalty)
Riven's approach: Rate limits are per-key and configurable in Riven Control. You can set custom rate limits per key and budget, with automatic routing to alternative models when a provider rate-limits you.
4. Context bloat
Every token in your request costs money — including system prompts, conversation history, and formatting. A typical chat application accumulates context rapidly:
| Turn | Input tokens | Cost at $3/M | Cost at $0.27/M | |---|---|---|---| | 1 (500 token prompt) | 500 | $0.0015 | $0.0001 | | 5 (3,000 token history) | 3,000 | $0.009 | $0.0008 | | 10 (8,000 token history) | 8,000 | $0.024 | $0.0022 | | 20 (20,000 token history) | 20,000 | $0.060 | $0.0054 |
At 1,000 conversations/day with 20 turns each, context bloat alone can cost $60/day on a $3/M model — versus $5.40/day on a cheaper model.
Solution: Multi-model routing. Use cheap models for early turns (where context is short) and expensive models only for complex turns. This can cut context costs by 80%+.
5. Fallback and retry costs
When a provider fails (rate limit, timeout, billing issue), you retry — and pay for the failed request plus the retry. Some platforms also silently substitute a different (potentially more expensive) model.
Riven's approach:
- Failed requests are logged and attributable
- Fallback routing can use cheaper models
- Per-key budgets prevent runaway costs from retries
Calculating your true cost
Here's a formula for calculating your true monthly API cost:
True Cost = (Tokens Used × Per-Token Rate)
+ (Top-up Fees)
+ (Markup Surcharge)
+ (Rate Limit Upgrade Costs)
+ (Retry/Fallback Costs)
+ (Context Bloat)Worked example
A SaaS app processing 500,000 requests/month:
- Average 1,500 input tokens, 500 output tokens per request
- Using GPT-5.6 ($2/$8 per million tokens)
Base cost:
- Input: 500K × 1,500 = 750M tokens × $2/M = $1,500
- Output: 500K × 500 = 250M tokens × $8/M = $2,000
- Base total: $3,500/month
Hidden costs on a platform with 5.5% top-up fee:
- Top-up fee: $3,500 × 5.5% = $192.50
- True cost: $3,692.50/month
With multi-model routing (60% to cheaper model):
- 300K requests on DeepSeek ($0.27/$1.10): $121.50 + $165 = $286.50
- 200K requests on GPT-5.6: $600 + $800 = $1,400
- Total: $1,686.50/month
- Savings: $2,006/month ($24,072/year)
How Riven eliminates hidden costs
| Cost type | Riven | Other platforms | |---|---|---| | Token markup | None (vendor list) | Varies | | Top-up fee | None | 5-15% | | Rate limit upgrades | Included (per-key limits) | Often paid | | Fallback costs | Controllable (budget caps) | Uncontrolled | | Context bloat | Mitigated (multi-model routing) | User's problem | | Audit/attribution | Full (every request metered) | Basic or none |
Getting started
Sign up free on Riven — no credit card required, no hidden fees, vendor list pricing on every model.
For a detailed pricing breakdown, see our pricing page and model catalog.