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 references are parsed but not looked up: asset ids aren’t checked, URLs aren’t fetched and data URIs aren’t stored, so an estimate doesn’t confirm that your inputs are usable. An estimate also doesn’t run content moderation, so a prompt can price fine and still be blocked at submit.

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 (z-image-turbo for image.generate).

promptstringdefault:""

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

inputsobjectdefault:{}

Slot name to a list of inputs: asset ids, asset URLs, https:// URLs or data: URIs. 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.

num_outputsintegerdefault:1

Outputs per job, from 1 to the model’s max_outputs. credits is the one-output price times this.

output_formatstringdefault:png

png, jpeg or webp, checked as on submit. Doesn’t change the price.

output_qualityinteger

1 to 100, jpeg and webp only. Doesn’t change the price.

presetstring

A preset slug or slug@version. Its parameters are applied before pricing, so the estimate reflects the model and tier the preset would pick.

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

201 Created with {"data": Estimate}.

capabilitystringrequired

The capability priced.

modelstringrequired

The model that would run, after defaulting.

creditsstring | nullrequired

The price in credits, as a decimal string: unit_credits times num_outputs. 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.

unit_creditsstring | nullrequired

The price of one output at this tier.

num_outputsintegerrequired

The number of outputs priced.

output_formatstring | nullrequired

The output format that would be used, for example png. null for models without selectable formats, such as video models.

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 bad num_outputs, output_format, output_quality or preset, a missing prompt, or an input that isn’t a valid reference. Same messages as submit.

An estimate never returns 402; it doesn’t check your balance.