API pricing (per token)
AI APIs bill per million input and output tokens, with output usually several times more expensive than input.
Estimate cost as (input tokens × input rate + output tokens × output rate) × requests. Cached input, batch tiers and shorter system prompts are the three levers most teams underuse.