API cost calculator

Estimate API spend from uncached input, output and cache tokens. Use a public price snapshot or enter your own rates, with the calculation shown below.

Price snapshot (UTC): 2026-11-12T11:30:38.363Z

Enter mutually exclusive token counts: uncached input excludes cache reads and writes. For APIs whose input total includes cached tokens, subtract those tokens first. A missing price is not a zero price.

Uncached input
Output
Cache read
Cache write (5 min)
Cache write (1 hour)

Enter whole, non-negative token counts, a positive request count and a rate for every used token category.

How the estimate works

For each category: tokens × USD per million tokens ÷ 1,000,000. Add the categories, then multiply by the number of requests. Rate fields remain editable for your actual group or contract.

This estimates token charges only. Choose the tier matching each request's input length and your key's group. Cache hits, output length and retries vary; calculate cold and warm requests separately. Images, video, tool fees, taxes and payment fees are excluded. Time-based prices can change after this snapshot.

FlyRouter

One key to a faster, more reliable enterprise AI gateway