Estimate
Price a generation request and get its output size without submitting it or spending credits.
POST /v1/generation/estimate
Validates a request exactly as submit would and returns the price, the resolved model and the output dimensions. Nothing is created, held or charged.
Scope: generation:read
The body is the submit body plus capability. Input asset references are parsed but not looked up, so an estimate doesn’t confirm that your input assets exist.
Body
The capability to price, for example image.generate. See Capabilities and models.
The model to price. Omit to use the capability’s first available model.
Required (non-empty) when the capability has prompt_required: true, same as on submit.
Slot name to a list of asset ids or asset URLs. Slot counts are checked against the model’s limits.
A resolution tier the model accepts. Defaults to the model’s default_resolution.
One of 1:1, 4:3, 3:4, 3:2, 2:3, 16:9, 9:16, 21:9, 4:5, 5:4. Defaults to 16:9 for video and 1:1 otherwise.
No model has quality tiers today; any value is rejected.
Clip length in seconds. Defaults to the model’s first duration; image models reject it.
Accepted and ignored for pricing.
Accepted and ignored.
The project to act in. Defaults to the X-Windpaint-Project header, then your organization’s default project.
Response
Returns {"data": Estimate}.
The capability priced.
The model that would run, after defaulting.
The price in credits, as a decimal string. This is the credits_estimate a submit would hold. null when the tier has no price, in which case the request can’t be submitted.
Output width in pixels. null for outputs without pixel dimensions.
Output height in pixels. Both edges are rounded to multiples of 16.
true when the model is serving and the tier has a price. When false, a submit returns 503.
Errors
| Status | When |
|---|---|
422 | Unknown capability or model, a model that doesn’t implement the capability, wrong slot counts, an unsupported resolution, aspect_ratio, quality or duration, a missing prompt, or an input that isn’t an asset id or API asset URL. Same messages as submit. |
An estimate never returns 402; it doesn’t check your balance.