Price each step of your agent before you pick a model tier An engineer published a script that prices each step of an agent pipeline against Anthropic's standard rate card, letting teams compare model tiers before committing. Using example values of 2 million calls at 1,200 input and 20 output tokens, the script shows Haiku 5.5 costing $260 versus $20,800 for Fable 5.2, and it accounts for Haiku's higher long-context rates above 100,000 tokens and the 50 percent Batch API discount. The engineer notes that validation costs do not shrink with the model, since small models hallucinate as readily as large ones. Most agent pipelines send every step to one model. Usually it is the large one, picked because it passed the demo. This post is the engineer's companion to our guide on small language models https://dev-station.tech/small-language-models/ . It turns the cost section of that guide into a script you can run against your own logs. The rates below are the Anthropic standard rate card in USD per million tokens, checked on 30 November 2026. Haiku 5.5 charges 0.10 for input and 0.50 for output, while Fable 5.2 charges 8.00 and 40.00. One catch. A Haiku 5.5 prompt over 100,000 tokens is billed at 0.50 and 2.50. RATES = { USD per million tokens: input, output "haiku-5.5": 0.10, 0.50 , "sonnet-5.5": 2.00, 10.00 , "opus-5.5": 4.00, 20.00 , "fable-5.2": 8.00, 40.00 , } HAIKU LONG = 0.50, 2.50 prompts over 100,000 tokens def cost model, tokens in, tokens out, batch=False : rate in, rate out = RATES model if model == "haiku-5.5" and tokens in 100 000: rate in, rate out = HAIKU LONG usd = tokens in rate in + tokens out rate out / 1 000 000 return usd 0.5 if batch else usd one month of a classification step example values calls, tin, tout = 2 000 000, 1 200, 20 for m in "haiku-5.5", "fable-5.2" : print m, round calls cost m, tin, tout , 2 With those example values the script prints 260.0 for Haiku 5.5 and 20800.0 for Fable 5.2. Swap in the call count and token sizes of a real step from your logs. The batch flag applies the 50 percent Batch API discount for work that can wait. Validation does not shrink with the model. A small model hallucinates as readily as a large one, so the test set stays the same size whichever tier wins. The full guide has the decision table and two hybrid routing patterns: small language models https://dev-station.tech/small-language-models/ .