Skip to main content
POST
This model supports image-to-video and reference-to-video, but not text-only generation or first/last frames. After submission, read the task ID from data[0].task_id and use Task Query to retrieve the status and result.

Generation modes

The same model, viduq4-preview, automatically selects the mode based on images, roles, and reference audio. No additional mode parameter is needed.
  • Image-to-video: Exactly one first frame; prompt optional; reference audio is not accepted.
  • Reference-to-video: 1–15 reference images, up to 3 reference audio clips, and a required prompt. With only one image and no reference audio, explicitly set role: "reference_image"; otherwise, image-to-video is used.
  • An explicit first frame (first_frame_image or role: "first_frame") cannot be combined with other images, reference image roles, or reference audio. Such combinations return HTTP 400.

Request headers

string
required
Bearer authentication in the format Bearer <token>, where <token> is your APIMart API Key.

Request parameters

string
required
Must be exactly viduq4-preview, in lowercase.
string
Video generation prompt, up to 20,000 characters.
  • Image-to-video: Optional. If omitted, the model generates content based on the first frame.
  • Reference-to-video: Required. If missing, returns HTTP 400.
string[]
Image array. Supports publicly accessible image URLs or Base64 Data URLs, such as data:image/png;base64,....
  • Image-to-video: Exactly one image, used as the first frame.
  • Reference-to-video: 1–15 images combined with image_with_roles.
May be combined with image_with_roles; counts are added together. Do not combine with first_frame_image or an explicit first_frame role. For a single image without a role, reference audio also determines whether reference-to-video is used.
object[]
Array of images with roles. Use one element for image-to-video; for reference-to-video, 1–15 images combined with image_urls.May be combined with image_urls to supply reference images, but first-frame roles cannot be mixed with reference assets.
string
For image-to-video only. Provide a public URL or Base64 Data URL for the first frame.When using this field, do not provide other images or reference audio. For reference-to-video, use image_urls or image_with_roles.
string[]
Array of reference audio URLs, for reference-to-video only. At most 3 clips combined with audio_url.MP3 required, 3–12 seconds per clip, up to 50MB each. Reference audio still requires at least one image and a prompt.Invalid audio format or duration causes the task to fail during execution with a full refund, rather than a synchronous HTTP 400 at submission.
string
Single reference audio URL, with the same requirements as audio_urls. At most 3 clips across both fields.
string
default:"16:9"
For reference-to-video only. Supports 1:1, 9:16, 16:9, 3:4, and 4:3; defaults to 16:9.For image-to-video, the first frame determines the aspect ratio and this parameter is ignored.
string
Compatibility alias for aspect_ratio with the same allowed values. Use only one of these fields. Has no effect on image-to-video.
integer
default:"5"
Video duration in seconds. Supports 3–16 seconds, not 1–2 seconds.
string
default:"720p"
Video resolution: 540p, 720p, 1080p, 2K, or 4K, case-insensitive.
boolean
default:"true"
Whether to output video with dialogue and sound effects.
  • true: Video with an audio track (default).
  • false: Silent video.
Videos with and without audio have the same price.
integer
Random seed. Omit or pass 0 for a random value.

Asset requirements

  • Image-to-video: Exactly one first-frame image is required; reference audio is not accepted.
  • Reference-to-video: 1–15 reference images are required; up to 3 reference audio clips are optional.
  • Supports PNG, JPEG, JPG, and WEBP, up to 50MB per image.
  • With Base64, the entire request body must be under 20MB. Public URLs are recommended.
  • Image URLs must be publicly accessible. Replace example URLs with actual accessible image URLs.
Both modes require images and do not support last_frame_image. Parameter errors such as mixing first frames with reference assets or exceeding image/audio counts return HTTP 400 at submission, without creating a task or charging. Invalid reference audio format or duration causes failure during execution and a refund.

Request examples

First frame only, without a prompt

Defaults to a 5-second, 720p video with audio.

First frame with an explicit role and 4K output

Silent video using the first-frame field

Video from multiple images and reference audio

Reference-to-video with a single image

This example has no reference audio and explicitly selects reference-to-video with the reference_image role. Replace all example image and audio URLs with actual accessible asset URLs.

Submission response

integer
Response status code; 200 indicates success.
array
Task submission result.

Query task results

Poll every 5–10 seconds and stop when the status is completed or failed. Use the unified query endpoint:
Successful response example (the video URL is a placeholder):
Video links are valid for 24 hours. Download and save them promptly. Use status to determine completion, not fixed progress milestones.

Billing

Billed by video duration and resolution: cost = duration (seconds) × the per-second rate for the resolution. See Model Pricing for current prices. Image-to-video and reference-to-video cost the same, with or without audio. Reference images and audio incur no additional charge. Failed tasks are automatically fully refunded.

Common parameter errors

The following synchronously return HTTP 400 without creating a task or charging:

Other Vidu models

For text-to-video or first/last frames, use Vidu Q3 Pro / Turbo. This model already supports multiple reference images; Vidu Q3 Mix / Standard also offers reference-to-video. For 1–2 second clips, choose viduq3-pro; this model requires at least 3 seconds.