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"promptstringrequiredPositive prompt.
e.g. "A cat surfing a wave at sunset"≥ 1 characters≤ 8192 charactersaccessobjectControls 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.
patobjectrequiredenabledboolean- default true
audiobooleanEnable model-native generated audio. Only supported by models with audio capability.
durationnumberVideo duration in seconds. Defaults to the model's default duration.
≥ 1≤ 60inputs(string | object)[]- ≤ 5 items
sourceobjectrequiredtype"url"requiredurlstringrequired
type"image"requiredasstring"auto""first_frame""last_frame""reference"
metadataobjectnegative_promptstring- ≤ 8192 characters
resolutionstringResolution tier. Defaults to the model's default tier.
"1080p""480p""4k""720p"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#
Video generation request validated and cost estimated
dataobjectrequiredcurrency"usd"requiredestimateKind"exact"requiredVideo generation always requires a pinned model, so the estimate is exact.
estimatedCoststringrequiredEstimated 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.