You will be able to
- Compute an API request's cost from its input and output token counts and their separate prices, and explain why output usually dominates.
- Turn a machine's hourly price and throughput into a cost per million tokens, and show from measured throughput how batching lowers it.
- Explain why idle time raises the cost per request of a self-hosted model, and estimate it from utilisation.
- Compute cost per useful answer from the share of requests that meet the SLO and the share that are correct, including the effect of retries.
- Explain why prices per token can't be compared across tokenizers, and compare cost per request instead.
- Estimate the API versus self-host break-even with stated assumptions, and name the costs it leaves out.
Topics
Your review
Sign in to keep your quick-check answers. The ones you miss come back for review after 1, 3 and 7 days, until they stick.
Sign in freeSources
AI Engineering · Chip Huyen, 2025
Chip Huyen. O'Reilly. Used: Ch. 4 "Evaluate AI Systems": "Evaluation Criteria" > "Cost and Latency"; "Model Selection" > "Model Build Versus Buy" > "Open source models versus model APIs" > "API cost versus engineering cost". Ch. 9 "Inference Optimization": "Online and batch inference APIs"; "Inference Performance Metrics" > "Throughput and goodput"; "Model Optimization" > "Overcoming the autoregressive decoding bottleneck". Ch. 10 "AI Engineering Architecture and User Feedback": "Step 2. Put in Guardrails" > "Output guardrails".
Pricing · Anthropic
Anthropic. Claude Platform documentation. Used: "Model pricing" table and tokenizer note; "Batch processing" (fetched 2026-10-21). Open source