GPT API Pricing Explained: How Token Costs Actually Add Up
The Two Numbers That Matter
OpenAI charges per 1,000 tokens, and input costs less than output. A long system prompt that gets sent on every call adds up fast, especially when you're making thousands of requests.
Input vs Output Tokens
Input tokens include your system prompt, conversation history, and user message. Output tokens are what the model generates. If you're building a chatbot with a long system prompt and short replies, input cost dominates. If you're generating long-form content, output is where the money goes.
Cached Inputs Cut Costs Dramatically
If the same prefix appears in multiple requests — like a long system prompt — cached input pricing is roughly half the regular rate. Enable prompt caching and you'll see the difference in your bill within a day.
Batch Processing Is 50% Off
For non-realtime workloads, batch API runs at half price. It takes up to 24 hours to complete, so it's not for chat, but it's perfect for processing documents, summaries, or data labeling.
A Quick Cost Calculation
Say you have a 2,000-token system prompt and generate 500 tokens per request. At GPT-4o-tier pricing, that's roughly $0.02-0.03 per request. At 10,000 requests a day, you're looking at $200-300. Cached inputs and a cheaper model tier can cut that in half.

