Guides
Everything you need to understand — and predict — what AI APIs cost.
- What is a token?A plain-English explanation of AI tokens: how tokenizers split text, how many tokens a word or page uses, and why token counts differ between models.
- How AI API pricing worksHow AI providers bill for API usage: per-million-token rates, input vs output prices, context windows, batch discounts, caching and long-context surcharges.
- Input vs output token cost, explainedWhy output tokens cost 2–6× more than input tokens, how to estimate the split for your workload, and practical ways to keep output costs down.
- How to estimate AI API costs before you buildA step-by-step method to forecast monthly AI API spend before writing code: measure prompts, model the output, multiply by volume and add a safety margin.
- Token cost by use case: chatbot, RAG and summarizationWorked token and cost estimates for three common AI workloads — a support chatbot, retrieval-augmented generation (RAG) and document summarization.