ChatGPT API pricing
ChatGPT API Cost Calculator
Estimate API spend for apps built with OpenAI models from monthly requests, prompt tokens, response tokens, cached input, and a practical budget buffer.
Estimate OpenAI API spend
Requests drive spend
Estimate monthly cost from request volume instead of guessing from a single prompt.
Input and output differ
Track prompt tokens and response tokens separately because output tokens often cost more.
Model repeated context
Apply cached-input assumptions when your app repeats long system prompts or context blocks.
How ChatGPT API cost is calculated
ChatGPT API cost is usually calculated from input tokens, output tokens, and the selected OpenAI model's per-token prices. Your monthly estimate increases with request volume, larger prompts, longer answers, retries, and tool-call loops.
Formula: input tokens * input price + output tokens * output price. The budget estimate adds your selected buffer percentage for production variance.
| Planning question | Use this input | Related page |
|---|---|---|
| How many tokens does my prompt use? | Paste raw text into the OpenAI tokenizer page. | OpenAI Token Calculator |
| What is the broader OpenAI API budget? | Use the OpenAI API cost page for the same workload model. | OpenAI API Cost Calculator |
| Which provider is cheapest for this workload? | Compare OpenAI, Claude, and Gemini with one set of assumptions. | AI API Pricing Calculator |
| What if the chatbot uses retrieval context? | Include embedding, retrieval, and generation cost. | RAG Cost Calculator |
FAQ
Is ChatGPT API cost included in ChatGPT Plus?
No. ChatGPT subscriptions and OpenAI API billing are separate. API usage is typically billed from model usage, input tokens, output tokens, and any supported pricing features such as cached input.
Why can output tokens dominate cost?
Output tokens are often priced higher than input tokens. If your chatbot writes long replies, summaries, reports, or code, response length can become the main cost driver.
Should I add a budget buffer?
Yes. Production traffic can include retries, longer conversations, larger context windows, and prompt changes. A buffer keeps the estimate closer to real operating cost.
Sources
OpenAI model prices in this site were last checked on 2026-07-04. Pricing can change without notice.