The reasoning-token cost formula (the one nobody warns you about)
On chat models like GPT-5.5, the cost formula is straightforward — you pay for the input tokens you sent and the output tokens the model wrote back. On the o-series, there is a third term that does not appear in any response field but absolutely appears on your invoice:
``` cost = (input_tokens / 1,000,000) × input_price + (reasoning_tokens / 1,000,000) × output_price ← invisible to caller + (visible_output / 1,000,000) × output_price ```
The reasoning_tokens count is reported in the API response under `usage.completion_tokens_details.reasoning_tokens`. Read it. Log it. If you skip this field you have no idea what you are actually paying per call — the `content` field shows you the 200-token answer, but the `reasoning_tokens` field is where the 4,000-token bill hides.
Practical reasoning-token shape we see across production deployments: simple math / classification with reasoning enabled = 200-800 reasoning tokens; multi-step code generation = 1,500-5,000 reasoning tokens; complex planning / proof-style tasks = 5,000-25,000 reasoning tokens; agentic loops with self-verification = 20,000-80,000 reasoning tokens per query. Budget the full envelope, not the visible answer.