Budget for the conversation, not one prompt.
Understand the inputs, outputs, and retries that shape an AI workload's cost.
Count the full input
Instructions, conversation history, retrieved documents, and tool results can all contribute to input usage. Long-running conversations can grow even when each new user message is short.
Separate input and output rates
Calculate input and output usage independently using the selected model's rate card. Cached input, reasoning tokens, and non-text modalities may have additional billing rules that require separate treatment.
Plan for successful outcomes
Include the attempts needed to produce an acceptable result. Track retry frequency and the cost of multi-step agents, and avoid equating a single request with a completed user task.
Use estimates to set guardrails
Estimate a realistic monthly range, then define per-request output limits and application-level usage budgets. Revisit the assumptions using measured usage after your integration is running.