Skip to main content
Version: Latest (1.9.x dev)

Estimate output 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 configured output price, 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 no configured price matched 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.