Skip to main content
Version: 1.12.0

Estimate request cost and budget impact

POST 

/v1/budget/estimate

Enterprise-only pre-flight check for one model request. Supply a model and optional max_tokens; DVARA estimates the maximum output cost from the model's output allowance price, the higher of its output and reasoning rates. Add messages, and optionally tools, in the Chat Completions shape to price the input tokens too. DVARA then checks the tightest applicable budget for the authenticated workspace and API key, and returns the remaining budget without calling a provider or writing usage or cost.

pricing_known: false means neither your pricing list nor the packaged model catalogue has a price for the model. In that case estimated_cost_usd is 0.0 and is not a reliable cost forecast. would_exceed_budget is still true when the workspace or key is already at or above its hard cap, even when pricing is unknown.

A nonempty API-key scope list must include completions:write. An unscoped key remains unrestricted. This endpoint is not included in the Open Source runtime.

Request​

Responses​

Cost estimate and current budget decision. Nullable remaining-budget fields mean no applicable budget is configured.