The same body as generate, validated the same way, priced rather than run. Nothing is created or held. Use it to show a cost before a user commits, or to reject a request that would break a budget.
With an explicit model the figure is exact. With model: "auto" it is the flat
$0.20 per image that auto holds, marked upper_bound.
Estimate cost has the patterns.
Request body#
promptstringrequiredPositive prompt.
e.g. "Cute Cat"≥ 1 characters≤ 8192 charactersmodelstring- default "auto"
"alibaba/qwen-image-2.0""alibaba/qwen-image-2.0-pro""alibaba/qwen-image-3.0""alibaba/qwen-image-3.0-pro""auto""black-forest-labs/flux-1-schnell""black-forest-labs/flux.1-dev""black-forest-labs/flux.2-dev" countnumber- default 1≥ 1≤ 20
accessobjectControls whether the create-task response should include a short-lived Public Access Token.
That token can be passed to browser or client-side code for polling task status and task images without exposing your API key.
patobjectrequiredenabledboolean- default true
destinationstring- e.g. "bunny-prod"≥ 1 characters≤ 64 characters
inputs(string | object)[]- ≤ 20 items
sourceobjectrequiredtype"url"requiredurlstringrequired
type"image"requiredasstring"auto""reference""source"
magic_promptbooleanmetadataobjectnegative_promptstring- ≤ 8192 characters
outputobjectformatstring"jpg""png""webp"
ratingobject | booleantruemode"nsfw_sfw"- default "nsfw_sfw"
sizeobject | string"16:9""16:9_4k""1:1""1:1_4k""1:2""1:2_4k""21:9""21:9_4k"aspectRatiostringrequired"16:9""1:1""1:2""21:9""2:1""2:3""3:2""3:4"type"aspect_ratio"requiredscalestring- default "base"
"4k""base"
webhookobjectcustomobject[]- ≥ 1 items≤ 5 items
urlstringrequired
dashboardbooleanSet to false to disable dashboard-managed webhooks for this task. Request-level custom webhooks are still sent.
Response#
Image generation request validated and cost estimated
dataobjectrequiredcurrency"usd"requiredestimateKindstringrequired"exact" when the model is pinned; "upper_bound" for
model: "auto", which reserves a flat per-image ceiling until a concrete model is selected."exact""upper_bound"estimatedCoststringrequiredEstimated cost in USD for the request. Nothing is generated or charged.
e.g. "0.03"
Errors#
A failed call names what went wrong in code, with a sentence in message. The codes, which of them are worth retrying, and how to read a validation failure are on Errors.