Your API invoice has two line items, not one. Prompt tokens are what the model read. Completion tokens are what it wrote. They are priced differently — and the reason is physics, not policy.
A completion token is a token the model generated. A prompt token is one it read. Providers bill them at different rates — typically 2× to 4× more for completion — and the asymmetry is not arbitrary.
Prompt tokens are consumed in one parallel prefill pass: the whole input goes through the network together, matrix-multiplied in bulk, GPU saturated. Completion tokens cannot do that. Every single output token requires its own full forward pass through the entire network, each one attending over everything that came before it. You cannot generate token 40 before token 39 exists.
So the price gap is you paying for sequential work that cannot be parallelised. Reading is a batch job. Writing is a queue.
System message, chat history, retrieved documents, tool schemas, the user's question. Everything you send. Processed in one prefill pass — cheap per token, but there can be an enormous number of them.
Everything the model emits. One forward pass each, strictly in order. Expensive per token, and the count is bounded by what you actually asked it to say.
A subword piece, not a word or a character. Rule of thumb: ~4 characters, or about ¾ of a word. "unbelievable" may split into three; a rare name into five.
Reasoning models emit internal deliberation you are billed for but never see. Your visible answer is 200 tokens; your completion charge may reflect thousands.
prompt_tokens and completion_tokens per request, multiply each by the actual published rate, and see which term is really dominating.Say output is billed at 4× input. Compare two requests:
| Request | Prompt | Completion | Cost units |
|---|---|---|---|
| Lean prompt, long answer | 500 | 1,000 | 500 + 4,000 = 4,500 |
| Stuffed RAG context, terse answer | 8,000 | 100 | 8,000 + 400 = 8,400 |
The second request generates ten times less text and costs nearly twice as much. The expensive-per-token half was not the expensive half.