AI API Cost Calculator
Enter token counts and your provider's per-token pricing to estimate the cost of a request, or of many requests at scale.
The example prices above are placeholders, not a real quote. Replace them with your provider's current per-token rate, prices vary by model and change often.
About this tool
Most AI providers price API usage per token, and typically charge a different rate for input tokens (the prompt you send) versus output tokens (what the model generates), since generating text costs more compute than reading it. This multiplies your token counts by your own entered rates to estimate cost per request and at whatever scale you're planning for.
Where to get accurate token counts and prices
Use the AI Prompt Token Counter to estimate token counts for actual prompt text. For pricing, always check your provider's current pricing page directly rather than relying on a cached number, since rates change between model versions and sometimes without a version change at all.
What this doesn't account for
This is a straight per-token calculation. It doesn't include volume discounts, prompt caching discounts, batch-processing discounts, minimum monthly fees, or free-tier credits, all of which can meaningfully change your real cost depending on the provider and how you're using the API.