LLM API Cost Calculator
Estimate and compare AI API costs across GPT, Claude, Gemini and more.
Frequently Asked Questions
How do I calculate LLM API costs?
Cost per request is input tokens × input price plus output tokens × output price, with prices quoted per million tokens. For example, 2,000 input tokens and 500 output tokens on a model priced at $3 and $15 per million costs $0.006 + $0.0075 = $0.0135 per request, or $405 a month at 1,000 requests a day.
Where do the model prices come from?
Prices are list prices from providers' published pricing, collected by the same synced catalog that powers the ToolDock LLM model explorer. The comparison shows when the catalog was last updated. Negotiated, regional or volume discounts aren't included.
Why do output tokens cost more than input tokens?
Models read the whole prompt in one parallel pass but generate output one token at a time, which takes far more compute per token. Output is typically priced 3–5× higher than input.
How does prompt caching reduce cost?
When the start of a prompt repeats across requests, such as a long system prompt or reference document, providers can serve it from a cache and bill those tokens at a discount, often 10–50% of the normal input price. Set the cached input percentage to see the effect; models without a cache price ignore it.
What is a batch API?
OpenAI, Anthropic and Google let you submit requests in bulk and get results within 24 hours at 50% off. It suits evaluations, data labeling and other work that doesn't need an instant reply.
How many tokens is a word?
In English a token averages about four characters, so 1,000 tokens is roughly 750 words. Code, non-English text and numbers usually take more tokens per word. Use the token counter for an exact count.