1 hour ago · 6 min read1228 words · Tech · hide · 0 comments

LLM APIs typically charge more for output tokens than input tokens. As of October 2026, I’ve found that output tokens for models by Anthropic, OpenAI, and other providers are roughly 5× more expensive than input tokens. Why is that? I recently started learning about LLM inference and this seemed like an interesting question to dig into. I timed a small model on my laptop, measuring the time spent processing each input and output token. In this experiment, I found that one output token can take up to 29× more time than a single input token, which gave me insight into how tokens are priced. Two Phases for Generating Text with LLMs# LLM inference requires two stages: prefill and decode. In the prefill phase the user’s whole prompt is processed in one pass. This requires reading the model’s weights just once. If you’re familiar with how the basic attention mechanism works, this is the stage where the key and value vectors are generated for the input tokens and stored in the KV cache.…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.