Calculate API costs from input, output, and cached token prices. Estimate per-request and monthly budgets entirely in your browser.

Defaults are calculation examples, not model quotes. Enter the valid prices from your provider.

Ready to process.

Per request
0
Per month
0
Cache saving / request
0

Per-request breakdown USD

Uncached input
0
Cached input
0
Output
0

Processed in this browser. No uploads or automatic saving.

AI Token Counter
How do I estimate LLM API costs and monthly budgets?

Enter the input and output tokens per request and the corresponding provider prices per million tokens. Multiplying the per-request total by monthly requests gives a fixed-workload budget. Compare quotes using the same workload, model version, region, and currency. This calculator does not fetch live prices or call any model.

How are input, output, and cached tokens billed here?

Cost = (total input minus cached input) times input price / 1,000,000 + cached input times cache-hit price / 1,000,000 + output times output price / 1,000,000. For 2,000 input, 500 output, 1,000 cached tokens and prices of 1, 4, and 0.1 respectively, one request costs 0.0031 currency units and 10,000 requests cost 31. These are example prices, not provider quotes.

Why might the actual bill differ?

Only the three token charges entered here are included. Cache writes, storage, search, image or audio fees, taxes, and other separate charges are excluded. Include billable reasoning tokens in the output quantity when your provider charges them there. Variable request lengths, failed-request charges, tiered pricing, and discounts can change the actual bill.

Does selecting USD or CNY convert exchange rates?

No. The selection changes the billing unit only, not your entered prices. All prices must use the same currency. Custom prices avoid treating an outdated quote as a live price. None of your entries are sent to a model provider.