input_tokens means three different things. Your cost function knows one of them.
Anthropic's input_tokens excludes cached tokens, OpenAI's includes them. Port a cost function between the two and a $0.082 request bills $0.378. Fields, traps, code.
5 posts tagged "gemini".
Every post tagged "gemini" in the journal. Tag archives are auto-generated from post frontmatter -- one entry per unique tag across non-draft posts. Currently 5 posts share this tag. Use the category filter above to scope by editorial type.
Showing 5 of 5 posts — page 1 of 1
Anthropic's input_tokens excludes cached tokens, OpenAI's includes them. Port a cost function between the two and a $0.082 request bills $0.378. Fields, traps, code.
Which LLM APIs are actually free to call in 2026 — not free chat apps or expiring trial credits. Verified free tiers, real rate limits, and the data catch.
The $/M input/output sticker hides cache-write premiums, a tokenizer tax, context surcharges, invisible reasoning tokens, and more. Ten verified costs, with proofs.
In 2026 the biggest lever on your LLM bill isn't which model. It's how hard the model thinks: reasoning tokens bill as output, and most models think by default.
There is no single cheapest LLM API. The winner depends on your workload shape. Verified $/M prices for classification, chat, coding, RAG, batch, and reasoning.