Cost planning

How to plan AI API costs

Calculate token-based costs, account for caching, and compare image and video pricing without confusing their billing units.

YOUR WORKLOAD / YOUR ESTIMATE

Put a number on your next test.

Use total tokens for the period you want to budget. Cached input is separate from uncached input, not an extra charge on the same tokens.

Estimated model usage cost USD · 15% discount included
$0.77$0.6545

Estimate only, using the same published rates as Models. Actual cache eligibility, token usage, retries, taxes, and separately billed services can change your total. No data is sent to a model.

Start with units, not the headline price

Language models typically charge separately for input and output tokens. Some also list a lower rate for cached input. Image models may charge per image or by resolution. Video models can charge per second or by tokens. These are different units and should never be compared as if they describe the same amount of work.

For a token-based request, estimate cost as uncached input tokens multiplied by the input rate, plus cached input tokens multiplied by the cached rate, plus output tokens multiplied by the output rate. Divide each term by one million when the price list uses 1M tokens.

A worked example

Consider an illustrative model priced at $1 per 1M input tokens and $4 per 1M output tokens. A request with 2,000 input tokens and 500 output tokens costs $0.004 before any discount. Ten thousand similar requests cost about $40. These figures explain the calculation; they are not a SinoRouter model quote.

At a 15% model-rate discount, the same illustrative workload would cost $34. Taxes, payment fees, retries that incur usage charges, and separately quoted services are not included. To budget your actual workload, replace the example rates with the relevant published model rates.

Caching and retries change the estimate

Do not assume every repeated prompt receives a cached rate. Cache eligibility, minimum prompt length, lifetime, and accounting depend on the provider. Use the usage fields returned by the API or your usage records to measure the actual cache-hit share.

Estimate cost per completed business task, not only per API call. An agent might call a model several times to finish one task. Long outputs, tool loops, failed workflows, and repeated attempts can increase costs. Add a measured allowance for these behaviors after a pilot.

  • Measure average input and output tokens by task.
  • Set output limits and application-side loop limits.
  • Track actual cached usage, not assumed cache savings.
  • Budget for peak demand and repeated attempts.

Video and image costs need their own worksheet

All video models currently listed by SinoRouter are priced per second. Record resolution, output duration, audio settings, and whether reference video is supplied. MiniMax H3, Seedance, and Wan add reference input duration to generated output duration when a video reference is used. Kling VIDEO 3.0 retains output-duration billing. Use the published matching tier and check additional image-input charges.

For images, confirm whether variations, high-resolution results, and edits use the same rate. For a large workload, send your target model mix and expected usage to our team for an enterprise quote. Compare final costs using the same task, quality target, and service tier.

Reference and next checks

Use the applicable provider or application documentation alongside your account-specific route information. These guides explain configuration and evaluation; they do not certify live support for every feature.