Core API guides
Estimate request cost before calling a model
Estimate CometAPI request cost before a model call by combining model directory pricing with input size, output limits, or task count.
Estimate cost before a model call by combining the model directory price with the units that the endpoint bills: tokens, images, audio length, or video tasks. Treat the estimate as a budget guard, then use actual usage and billing records after the request completes.
The result is a pre-call estimate:
The response includes actual usage after the model call:
The result is the task budget:
Last modified on June 23, 2026