LLM API pricing & model selection guide: token cost, caching & routing
Headline per-token numbers tell only part of the cost story. Output tokens are often 3x–10x more expensive than input tokens, reasoning models generate hidden thinking tokens, and prompt caching can cut repeated system-prompt bills by up to 75%–90%.
By ZICQ · Updated
Browse the public prompt library →
How to use these templates
- Choose an example and replace every bracketed field with your task and input.
- Paste the prompt into LLM Pricing. Supply the document or code needed for the task.
- Check facts, citations and output format; revise the prompt when the result misses a requirement.
Four reusable prompt examples
Monthly LLM API budget estimation formula
Daily Cost = Calls/day * ((InputTokens * InputPricePer1M + OutputTokens * OutputPricePer1M) / 1,000,000)
Cache-Adjusted Input Cost = (UncachedTokens * BaseIn + CachedTokens * CacheReadPrice) / 1,000,000
# Use ZICQ's live interactive calculator:
# https://zicq.com/en/rankings/models?dim=price
Two-tier model routing checklist
1. Router / classifier / extraction (high volume, JSON output): low-cost flash models or free-tier endpoints.
2. Complex architecture, subtle debugging, or multi-step code edits: frontier reasoning or high-coding-index models.
3. Long-context retrieval (>128K tokens): check cache-read rate and latency alongside max context.
Prompt to estimate cost & choose a model from specs
Compare Model A ([in/out $/1M]) and Model B ([in/out $/1M]) for a workload of [calls/day] calls averaging [in_tok] input tokens (with [cache_pct]% static prefix) and [out_tok] output tokens.
Return a 30-day cost table and highlight break-even thresholds.
Empirical testing notes & best practices
Observations and tuning tips gathered from our hands-on testing across DeepSeek (V3/R1) and ChatGPT (GPT-4o/o1):
- Temperature & Determinism: For structured JSON extraction and code refactoring, keep temperature between 0.1 and 0.2 to avoid schema deviations. For analytical synthesis, 0.4–0.6 balances coherence with insight.
- Hallucination Mitigation: Always include negative constraints (e.g., "If evidence is missing, state unknown rather than extrapolating"). Testing shows models without explicit unknown-fallbacks hallucinate significantly more on sparse inputs.
- Reasoning Models (R1 / o1): When prompting reasoning models, do not over-prescribe manual step-by-step chains. Over-constraining internal reasoning degrades problem-solving accuracy compared to setting clear goals and verification constraints.
Frequently asked questions
Why is output token pricing much higher than input pricing?
During autoregressive decoding every generated token requires a full forward pass and KV-cache read across memory bandwidth, whereas prompt tokens are processed in parallel during prefill.
How does prompt caching reduce AI agent expenses?
Agents resend long system prompts, tool schemas, and repository files on every turn. Prompt caching lets providers reuse computed KV states at a fraction of standard input rates.
Where can I check live hourly LLM API prices across providers?
Check ZICQ's LLM Leaderboard (/en/rankings/models) and individual model spec pages (/en/models/{slug}), synced hourly from OpenRouter and Artificial Analysis.
More ZICQ resources
- Writing prompts
- Engineering prompts
- Agent Skills library
- AI news
- Model rankings
- About ZICQ and contact
All practical guides · DeepSeek · ChatGPT · Claude · Agent Skills · LLM Pricing · MCP Servers