A practical budget for AI API usage
Estimate text, image and video costs with the units that actually appear on your model's pricing page.

Start with the unit, not the headline price
Text models may bill input and output tokens separately, while image or video models can use requests, images, duration or other parameters. Check the current pricing and the exact unit for the model and endpoint you selected. A low input-token price alone does not tell you what a complete interaction costs.
An estimate combines the amount used with the corresponding rate. Text models often distinguish input from output, and some list cached usage or other conditions. Image and video models may bill by request, image count, duration or a combination of settings. Find the unit for the chosen model first; numbers expressed in different units cannot be compared directly.
Make a small estimate before scaling
For a text workflow, estimate input tokens and output tokens per request, multiply each by its own rate, and then multiply by expected request volume. For generation tasks, include the applicable unit and options shown in the model's pricing. Use realistic ranges: a long conversation or a longer clip can cost more than a short test.
Do not count only the shortest request. Conversation history, system instructions and retrieved context can contribute input, while output length matters too. A creative workflow can include several candidates, review and regeneration. Map every possible call in one user action and estimate a low, middle and high case before multiplying by expected volume.
Estimate usage, pricing units and request volume before calculating cost.Measure real usage and investigate surprises
Compare the estimate with the usage reported in your dashboard after a small controlled run. Look for repeated prompts, unexpectedly long context, retries, failed tasks and changes in parameters. Billing and refunds depend on the model and task outcome, so verify the displayed rules instead of assuming every failure is free.
Use representative samples without sensitive data in a controlled run, then compare your estimate with dashboard usage. If they differ, inspect context length, output limits, repeated requests, model selection and billing units. One successful request cannot predict a month of usage. Recalculate when the mix of tasks or user behavior changes.
Network timeouts, regeneration and uncertain asynchronous task state can all change the number of requests. Whether a task is charged or refunded depends on the model, outcome and platform rules; do not assume one answer for every failure. Check a known task before creating another, and explain when a retry may start a new billable operation.
Set boundaries that fit the product
Choose a budget, monitor usage and apply the limits available to your account or application. A shorter context, smaller output or different model may reduce cost, but measure the effect on answer quality. Treat prices as changeable and recheck them before launching a high-volume feature.
A budget does not mean sending every request to the cheapest model. Set a quality floor for each task, then compare how model choice, output length and context affect both results and cost. Use the limits and monitoring actually available to your account. Label example prices as hypothetical, and check current prices before launch or a large change.
Break down the cost of a user action
List every call in one user action. A question-answering flow may retrieve documents, send system instructions, conversation history and retrieval results to a model, and generate a reply. Text input and output may have different prices; image, audio and video requests can use other units.
For illustration only, suppose input costs $1 per million tokens and output costs $4. A request using 2,000 input and 500 output tokens would cost an estimated $0.002 plus $0.002, or $0.004. This is not a Max Router price. Check the selected model's current units and options before calculating; don't compare a per-request price directly with a per-second price.
Base estimates on real usage patterns
A short question may carry a long system prompt and conversation history, which can grow with follow-up turns. Estimate from representative samples and calculate low, typical and high usage scenarios. Include retries, repeated generations, batches and human review where they are part of the workflow.
Whether failed tasks are charged or refunded depends on the model, outcome and current rules. Check an existing asynchronous task before creating another when possible. Compare a small pilot with actual usage, then investigate whether differences come from request count, input length, output length or model choice before changing the product.
Set a sustainable budget
Track features separately—for example, support summaries, image generation and internal experiments—so unusual growth is easier to locate. Use limits and notifications that your account or application actually provides; don't assume an unverified control exists.
When traffic rises, investigate repeated submissions, error loops and configuration changes first. Shorter context, output limits, appropriate caching or another model may reduce cost but can affect quality, freshness or privacy. Retest against the same examples. Record prices, assumptions, sources and dates, and distinguish actual spend from a forecast.
A worked example, with imaginary prices
Suppose a model charges $1 per million input tokens and $4 per million output tokens. At one million input tokens and 250,000 output tokens, the estimate is $1 plus $1, or $2 in total. These numbers are only arithmetic examples, not Max Router prices. Real charges depend on the model, current rates and applicable billing rules shown for your request.
In a budget sheet, record expected request volume, average input and output, the prices used and the calculation date. Record actual results beside them. When prices or usage change, you can see which assumption needs revision. Estimate different task types separately so an expensive edge case is not hidden by an average.