← AI coding guides
Mikie / Free tools

Token costs.
Made clear.

Put a price on an API run. Use your provider’s current rates to see how input, output and caching add up.

Select relevant code from a repository, then use it for a focused coding task.REPOSITORYFOCUSED TASK
Less to read. More to work with.

Calculate your token cost

TokensUSD / million
Uncached input
New prompts and context
Cache reads
Previously cached input
Cache writes
If your provider bills them separately
Output
Generated and billed reasoning tokens
API token cost
—

Enter token counts and your model’s rates to see an estimate.

Your inputs stay in this browser. This estimates metered API tokens; subscription allowances and credits use their provider’s own rules.

Start with the right numbers.

  1. Read token counts from your provider’s usage report. Keep uncached input, cache reads, cache writes and output separate so you count each token once.
  2. Enter the USD price per million for each category you use. Use your current model’s rates, including any contracted discounts. Leave unused categories at zero tokens.
  3. Compare equivalent tasks and accepted results. A smaller token bill is useful when the coding work still meets your tests and review criteria.

For input-only providers with one combined input count, subtract the separately reported cache-read and cache-write counts before entering uncached input. Tool charges and subscription allowances belong in their own calculation.

Use the estimate to change the work.

If input dominates, tighten the repository context and remove repeated reads. If output dominates, request a concise patch and test summary. If retries dominate, write the acceptance check before the agent starts.

Check rates at OpenAI API pricing and Claude API pricing. An estimate supports planning; your provider’s bill remains the source for actual charges.