Skip to navigation

Prepare and validate video settings

View as Markdown

Start the video workflow here: send the model and selected settings, then use the returned available options to complete the selection (resolution before aspect_ratio, and aspect_ratio before size). Repeat with the chosen values until is_complete is true. When a supported duration and resolution are supplied, estimated_price gives a preliminary customer price; it is an estimate, not the final generation charge. This endpoint does not accept a prompt or start a generation. After preparation, send the same model and settings plus your prompt to POST /v1/videos/generate. Supplied unsupported values are returned in errors with allowedValues while the response remains 200 so clients can show alternatives. No defaults are applied.

Authentication

AuthorizationBearer

API key passed as Authorization: Bearer token.

Request

This endpoint expects an object.
modelstringRequired

Required video model ID from GET /v1/models?type=video.

durationinteger or nullOptional
Optional duration in seconds. When present, it must be supported by the selected model.
resolutionstring or nullOptional

Optional model resolution. When selected, the response narrows aspect_ratios to those compatible with it.

aspect_ratiostring or nullOptional

Optional aspect ratio. Select a compatible resolution first; the response then narrows sizes to this format.

sizestring or nullOptional
Optional size supported for the selected resolution and aspect ratio.
generate_audioboolean or nullOptional
Optional audio selection used when calculating an estimated price.
has_reference_inputboolean or nullOptional

Whether the planned generation uses reference input. Used only to select a matching estimated-price SKU; this does not upload or attach a reference.

Response

Available settings, validation state, and an optional estimated price
modelstring
selectionobject
availableobject

Options are narrowed by the selections already provided. Aspect ratios require a valid resolution; sizes require a valid resolution and aspect ratio.

is_validboolean
Whether the supplied selections are valid so far. A partial selection can be valid but incomplete.
is_completeboolean
True when duration, resolution, aspect ratio, and size are all selected and valid.
errorslist of objects
next_stepenum or nullOptional
Allowed values:
estimated_priceobject or nullOptional
Approximate customer price calculated from the current pricing configuration. Available after a supported duration and resolution are selected.
price_errorstring or nullOptional

Errors

400
Bad Request Error
402
Payment Required Error