How much do AI API calls cost?
It depends on the provider, the model, and how much text you send and receive. APIs are usually billed per token, separately from chat subscriptions. Check the provider's current pricing page and set a spending limit.
We don't quote prices here because they change often and differ by model. Check the provider's current pricing page for real numbers. What we can explain is how the billing works, so you can estimate your own costs.
How API billing works
- You pay for usage, not a flat fee. An API is how scripts and other software talk to an AI model. It's usually billed separately from any chat subscription.
- Usage is measured in tokens. A token is a small chunk of text, roughly part of a word. You're charged for the text you send in and the text the model sends back, often at different rates.
- Bigger models cost more. The most capable models generally cost more per token than smaller, faster ones.
- Context adds up. Sending your whole Project Brain with every request multiplies the input cost.
Estimate before you build
- Measure one run. Most providers show token usage per request in their console or response.
- Multiply by frequency. One status report a week is very different from a script that runs every hour.
- Add a margin for retries and testing.
Keep spending under control
- Set a spending limit or alert in the provider's console, if one is available, before you run anything automated.
- Use smaller models for simple jobs such as sorting or reformatting, and save larger ones for analysis and writing.
- Send only what's needed. Trim documents to the relevant sections.
- Test on small samples before running on a whole folder.
- Watch for loops. A script that calls the API repeatedly by mistake is the most common cause of surprise bills.
API usage comes into play with the automation work in Chapter 12 of the book. If you only use a chat app, API costs don't apply to you. See Do I need a paid AI subscription?.
For a plain-English walkthrough, read API Costs Are Confusing and Scary and Measuring ROI on AI Tools Is Difficult.
Last updated
Still need help?
Or browse more AI Tools & Setup articles, all help topics, or the blog.