Estimate cost

Prices a video request without running it. Same body as generate, nothing generated and nothing charged.

POST/video/generate/estimate
AuthAPI keyorOAuth tokenHow to send it

The same body as generate, validated the same way, priced rather than run. The figure is always exact, because the model is always explicit. Resolution and duration move a video's price a lot, so check it before a long render.

Request body#

modelstringrequired
"bytedance/seedance-2.0-mini""google/gemini-omni-flash-1.1""prunaai/p-video""xai/grok-imagine-video-1.5"
promptstringrequired

Positive prompt.

e.g. "A cat surfing a wave at sunset"≥ 1 characters≤ 8192 characters
accessobject

Controls 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 videos without exposing your API key.

patobjectrequired
enabledboolean
default true
audioboolean

Enable model-native generated audio. Only supported by models with audio capability.

durationnumber

Video duration in seconds. Defaults to the model's default duration.

≥ 1≤ 60
inputs(string | object)[]
≤ 5 items
sourceobjectrequired
type"url"required
urlstringrequired
type"image"required
asstring
"auto""first_frame""last_frame""reference"
metadataobject
negative_promptstring
≤ 8192 characters
resolutionstring

Resolution tier. Defaults to the model's default tier.

"1080p""480p""4k""720p"
webhookobject
customobject[]
≥ 1 items≤ 5 items
urlstringrequired
dashboardboolean

Set to false to disable dashboard-managed webhooks for this task. Request-level custom webhooks are still sent.

Response#

Video generation request validated and cost estimated

dataobjectrequired
currency"usd"required
estimateKind"exact"required

Video generation always requires a pinned model, so the estimate is exact.

estimatedCoststringrequired

Estimated cost in USD for the request. Nothing is generated or charged.

e.g. "0.05"

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.