MuseSpark
MuseSpark
Models & toolsVideo models

Vidu Q4 Preview API guide

Vidu Q4 Preview API: Generate video from image and optional audio references with Vidu Q4 Preview. The image-to-video and reference-to-video scenarios use different requirements; choose the matching generation_type.

Model overview

Generate video from image and optional audio references with Vidu Q4 Preview. The image-to-video and reference-to-video scenarios use different requirements; choose the matching generation_type.

API integration

DocumentationValue
API invocation identifiervidu-q4-preview
IntegrationAsync task API

Use this invocation identifier in API requests. Check your authorized model catalog for access. Follow the Quickstart for your first complete call.

Request parameters

Select a mode to highlight its required inputs. Mode selection does not change the API field names.

Studio presets describe the form setup, not guaranteed server defaults. Send preset values explicitly to reproduce them.

promptstringNon-nullConditional

Additional requirements depend on other values. See model rules.

Optional for image-to-video generation; required for reference mode. Maximum 20,000 characters.

Length: maximum 20000.

imagesarray<string>Non-nullRequired

Additional requirements depend on other values. See model rules.

Provide one first-frame image in Frame mode, or 1-15 reference images in Reference mode. The total image limit is 15.

Item count: minimum 1; maximum 15.

Media types: image/*.

audio_urlsarray<string>Non-nullOptional

Reference MP3 audio only; up to 3 clips, each 3-12 seconds and at most 50 MB. Requires reference images and a prompt.

Item count: maximum 3.

Media types: audio/*.

generation_typestringNon-nullOptional

Sets generation type for this item.

Allowed values: "frame", "reference".

Studio preset: "frame".

resolutionstringNon-nullOptional

Default 720p.

Allowed values (10)

Allowed values: "540p", "540P", "720p", "720P", "1080p", "1080P", "2K", "2k", "4K", "4k".

Studio preset: "720p".

durationintegerNon-nullOptional

Output seconds; default 5.

Value: minimum 3; maximum 16.

Studio preset: 5.

audiobooleanNon-nullOptional

Defaults true; same price for silent output.

Studio preset: true.

aspect_ratiostringNon-nullOptional

Output aspect ratio for reference generation. First-frame generation follows the source image aspect ratio.

Allowed values: "1:1", "9:16", "16:9", "3:4", "4:3".

Studio preset: "16:9".

batch_sizeintegerNon-nullOptional

MuseSpark batch count; each child task requests one provider output.

Repeats MuseSpark execution within one logical task. This is separate from a model-native output count.

Value: minimum 1; maximum 15.

Studio preset: 1.

seedintegerNon-nullOptional

Omit or use zero for random seed.

No parameters match. Clear the search or reset the filters.

Model rules

Input modes

Select a mode by supplying its required public inputs. The mode identifier describes a documentation/form choice; do not send input_mode as a model parameter.

ModeRequired inputs
First Frameimages
Image and Audio Referencesimages
  • When the input mode is Image and Audio References, provide prompt.
  • When generation_type is "reference", provide prompt.
  • When generation_type is "frame", keep images, when supplied, at least 1 and at most 1 items; omit audio_urls.
  • When the input mode is First Frame, use frame for generation_type; keep images, when supplied, at least 1 and at most 1 items; omit audio_urls.
  • When the input mode is Image and Audio References, provide prompt, images; use reference for generation_type.

Parameter meaning

  • Image-to-video can derive content from its first frame; reference-to-video requires a prompt to describe how the reference assets should interact.

batch_size controls repeated MuseSpark executions. Output grouping, sequential image generation, and video shot count are separate concepts.

Request examples

Replace example media URLs and YOUR_... input identifiers with your own valid resources. Examples are checked against the exported item schema; media access and paid execution are separate runtime checks.

Set MUSESPARK_API_KEY and a stable MUSESPARK_REQUEST_ID before submitting. Preserve the request ID for retries of the same request and use a new ID for new work. Python examples use requests; JavaScript examples use Node.js 20 or later. The standalone Quickstart includes task polling and recovery.

First Frame

curl --fail-with-body 'https://api.musespark.ai/api/v1/openapi/task' \
  -H "Authorization: Bearer $MUSESPARK_API_KEY" \
  -H "X-Idempotency-Key: $MUSESPARK_REQUEST_ID" \
  -H 'Content-Type: application/json' \
  -d '{
  "item_key": "vidu-q4-preview",
  "parameters": {
    "audio": true,
    "duration": 5,
    "batch_size": 1,
    "resolution": "720p",
    "aspect_ratio": "16:9",
    "generation_type": "frame",
    "prompt": "A paper city under soft morning light",
    "images": [
      "https://example.com/input-1.png"
    ]
  }
}'

Parameters used: audio · duration · batch_size · resolution · aspect_ratio · generation_type · prompt · images.

Image and Audio References

curl --fail-with-body 'https://api.musespark.ai/api/v1/openapi/task' \
  -H "Authorization: Bearer $MUSESPARK_API_KEY" \
  -H "X-Idempotency-Key: $MUSESPARK_REQUEST_ID" \
  -H 'Content-Type: application/json' \
  -d '{
  "item_key": "vidu-q4-preview",
  "parameters": {
    "audio": true,
    "duration": 5,
    "batch_size": 1,
    "resolution": "720p",
    "aspect_ratio": "16:9",
    "generation_type": "reference",
    "prompt": "A paper city under soft morning light",
    "images": [
      "https://example.com/input-1.png"
    ]
  }
}'

Parameters used: audio · duration · batch_size · resolution · aspect_ratio · generation_type · prompt · images.

Output

Creation returns a task ID inside data. Poll that task until completion, then save data.result.output_urls and any data.result.batch_results. See the task lifecycle for terminal states, result retention, and errors.

Troubleshooting

For rejected inputs, check the field type, accepted values, and conditional requirements in Request parameters and Model rules. Correct the affected fields before submitting again.

If creation times out, preserve the request identity and any known task ID. Follow Errors, timeouts and retries before submitting again.

The public input snapshot was exported on 2026-11-09. Current prices and availability are listed in the model center.