Windpaint
Generation

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

capabilitystringrequired

The capability to price, for example image.generate. See Capabilities and models.

modelstring

The model to price. Omit to use the capability’s first available model.

promptstringdefault:""

Required (non-empty) when the capability has prompt_required: true, same as on submit.

inputsobjectdefault:{}

Slot name to a list of asset ids or asset URLs. Slot counts are checked against the model’s limits.

resolutionstring

A resolution tier the model accepts. Defaults to the model’s default_resolution.

aspect_ratiostring

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.

qualitystring

No model has quality tiers today; any value is rejected.

durationinteger

Clip length in seconds. Defaults to the model’s first duration; image models reject it.

seedinteger

Accepted and ignored for pricing.

webhook_urlstring

Accepted and ignored.

project_idstring

The project to act in. Defaults to the X-Windpaint-Project header, then your organization’s default project.

Response

Returns {"data": Estimate}.

capabilitystringrequired

The capability priced.

modelstringrequired

The model that would run, after defaulting.

creditsstring | nullrequired

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.

widthinteger | nullrequired

Output width in pixels. null for outputs without pixel dimensions.

heightinteger | nullrequired

Output height in pixels. Both edges are rounded to multiples of 16.

availablebooleanrequired

true when the model is serving and the tier has a price. When false, a submit returns 503.

Errors

StatusWhen
422Unknown 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.