OpenAI API pricing
OpenAI GPT API: pricing and cost estimation
A practical guide to estimating GPT API spend across input, output, cached tokens and tool calls.
Start with a transparent estimate
Estimate input and expected output tokens in the PromptCost calculator. Then confirm the exact model, token direction, cache policy, batch discount and tool charges with the provider.
What to include in the budget
- Input tokens, including system instructions and retrieved context.
- Output tokens, which often dominate generation-heavy workflows.
- Prompt caching, batch processing and long-context terms where available.
- Tool calls, web search, storage or other non-token charges when applicable.
- Retries, evaluation traffic and the buffer needed for production variability.
Best fit
Teams that need a transparent starting point for GPT API budgeting and model selection.