Video modelsVideo guide

Video guide

Integration steps

  1. Call Get video generation settings (no authentication required) to confirm the model is available and read its supported modes, durations, aspect ratios, resolutions and reference limits.
  2. Call Get a video quote for the credits required, quote_id and rate_version.
  3. Call Create a video with the same request parameters as the quote, plus quote_id and quote_version.
  4. Learn when the job ends through Retrieve a job or a webhook, then fetch the result.

See Video model overview for a comparison of the models. In the settings response, models[].available tells you whether a model can be submitted now, and available_resolutions lists the resolutions you can submit.

Minimal request parameters

All models use the same quote and generation endpoints. A minimal text-to-video (t2va) request only changes model and resolution per model:

ModelMinimal request parameters
minmax-h3-flashmode=t2va, duration=5, ratio=16:9, resolution=768p, references=[]
minmax-h3-promode=t2va, duration=5, ratio=16:9, resolution=768p, references=[]
wan3.0-videomode=t2va, duration=5, ratio=16:9, resolution=720p, references=[]
seedance-2.0mode=t2va, duration=5, ratio=16:9, resolution=720p, references=[]
seedance-2.0-minimode=t2va, duration=5, ratio=16:9, resolution=720p, references=[]
seedance-2.0-fastmode=t2va, duration=5, ratio=16:9, resolution=720p, references=[]
seedance-2.5mode=t2va, duration=5, ratio=16:9, resolution=720p, references=[]
seedance-2.5-flashmode=t2va, duration=5, ratio=16:9, resolution=720p, references=[]

Get a quote

The request field of a quote request takes the same parameters as the generation request. Quoting does not create a job or reserve credits.

curl -X POST 'https://shixux.com/api/v1/video/quote' \
  -H 'X-API-Key: yb_xxx_yyy' \
  -H 'Content-Type: application/json' \
  -d '{"operation":"generate","request":{"model":"seedance-2.5","mode":"t2va","prompt":"A lighthouse by the sea with a slow push-in","duration":5,"ratio":"16:9","resolution":"720p","references":[]}}'

A successful response contains quote_id, rate_version, the billable duration billable_seconds and the credits required credits. The quote is bound to the model, mode, aspect ratio, duration, resolution, prompt and references; if any of them changes, get a new quote.

Submit the generation

Submit with the same parameters as the quote. Pass the quote's quote_id and rate_version as quote_id and quote_version, and send a unique Idempotency-Key.

curl -X POST 'https://shixux.com/api/v1/video/generate' \
  -H 'X-API-Key: yb_xxx_yyy' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: video-001' \
  -d '{"model":"seedance-2.5","mode":"t2va","prompt":"A lighthouse by the sea with a slow push-in","duration":5,"ratio":"16:9","resolution":"720p","references":[],"quote_id":"quote_xxx","quote_version":1,"generate_audio":true}'

If the rate changes after the quote, the submission returns 409 VIDEO_RATE_CONFLICT. Get a new quote before submitting again.

Generation modes and references

ModeReferences
t2vaNo references; references is an empty array
fl2vaOne first-frame image with role: "first", optionally one last-frame image with role: "last"
ref2vaImages, videos or audio with role: "reference", within the selected model's limits

Each item in references contains the asset ID asset_id, the type kind (image, video or audio) and the role role (reference, first or last). References must belong to your account and be confirmed uploads, uploaded with purpose set to video_image (images), video_clip (videos) or video_audio (audio). See Uploads.

  • ratio: "adaptive" applies only to models that support adaptive aspect ratios. Some models require adaptive for first/last-frame requests; see Video model overview.
  • Reference markers in the prompt must correspond to media actually provided in references.
  • voice_bindings binds a person in a reference image to an audio asset to set that person's voice. Each person image can be bound to at most one audio asset.

Jobs, results and stopping

Video job states are queued, processing, succeeded, failed and cancelled. After success, call Retrieve a job result for the download URL, and call it again after the URL expires. retained_until gives how long the result file is retained.

Call Stop a generation job to stop a job. If the job is stopped before generation starts, the reserved credits are refunded in full; if generation has already started, the reserved credits are not refunded. Pass queued_only=true to stop the job only while it is still queued, so that a job that has already started is not stopped by mistake.

For more rules, see Error handling, Webhooks, Uploads and Asynchronous jobs.

On this page