Vidu Q4 Reference to Video API
vidu/q4/reference-to-videoVidu Q4 Reference to Video combines a prompt with up to 12 reference images and 3 voice clips into 3–16 second videos at up to 4K. Tag each reference in the prompt to keep characters, products and places recognisable, with optional generated audio at no extra cost.
Drag and drop files, paste from clipboard, or provide a URL. Required. 1–12 JPEG, PNG or WebP images.
2/12 files added
Drag and drop files, paste from clipboard, or provide a URL. Optional. Up to 3 MP3 voice clips, ideally 3–12 seconds each.
REST API
Quick Start
Make your first Vidu Q4 reference-to-video request in three steps. The example tags two reference images in the prompt and returns a task_id.
Connect to the Vidgo API
Create an API key, keep it on your server, and send it in the Authorization header as a Bearer token.
- Endpoint
- POST
https://api.vidgo.ai/api/generate/submit - Authentication
- Authorization: Bearer VIDGO_API_KEY
Submit one generation task
Run the short example with a prompt and at least one reference image; voice clips are optional.
curl --request POST \
--url "https://api.vidgo.ai/api/generate/submit" \
--header "Authorization: Bearer $VIDGO_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "vidu/q4/reference-to-video",
"input": {
"prompt": "[@reference_image_1] is the shop owner, [@reference_image_2] is her corner bookshop at dusk. She slides the last paperback onto the shelf, flips the hanging sign on the door and smiles at the street outside. Soft rain on the window, a bell rings as the door closes. One continuous medium shot with a slow dolly to the right.",
"reference_image_urls": [
"https://cdn.vidgo.ai/apis/models/vidu/q4/reference-to-video/v1/01/input-01.png",
"https://cdn.vidgo.ai/apis/models/vidu/q4/reference-to-video/v1/01/input-02.png"
],
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9",
"generate_audio": true
}
}'Wait for the result
Use the returned task_id to check the same task until it reaches finished or failed. On success, read data.files[].file_url.
Track status
GET https://api.vidgo.ai/api/generate/status/{task_id}Poll about every 2 seconds while the status is not_started or running. Stop on finished or failed; on success, read data.files[].file_url. For long-running jobs, increase the interval gradually, or add callback_url to the submit request to receive the final result asynchronously.
not_startedrunningfinishedfailed{
"code": 200,
"data": {
"task_id": "KJ245166VBTPWOAM",
"status": "not_started",
"created_time": "2026-11-05T07:10:52"
}
}{
"code": 200,
"data": {
"task_id": "KJ245166VBTPWOAM",
"status": "finished",
"files": [
{
"file_url": "https://cdn.vidgo.ai/apis/models/vidu/q4/reference-to-video/v2/01/output-01.mp4",
"file_type": "video"
}
],
"created_time": "2026-11-05T07:10:52",
"error_message": null,
"progress": 100
}
}Complete runnable example
Open this after the three-step flow is clear. It combines submission, polling, terminal-state handling, and result extraction in one script.
set -euo pipefail
: "${VIDGO_API_KEY:?Set VIDGO_API_KEY in your environment}"
REQUEST_BODY=$(cat <<'JSON'
{
"model": "vidu/q4/reference-to-video",
"input": {
"prompt": "[@reference_image_1] is the shop owner, [@reference_image_2] is her corner bookshop at dusk. She slides the last paperback onto the shelf, flips the hanging sign on the door and smiles at the street outside. Soft rain on the window, a bell rings as the door closes. One continuous medium shot with a slow dolly to the right.",
"reference_image_urls": [
"https://cdn.vidgo.ai/apis/models/vidu/q4/reference-to-video/v1/01/input-01.png",
"https://cdn.vidgo.ai/apis/models/vidu/q4/reference-to-video/v1/01/input-02.png"
],
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9",
"generate_audio": true
}
}
JSON
)
SUBMIT_RESPONSE=$(curl --silent --show-error --fail-with-body \
--request POST \
--url "https://api.vidgo.ai/api/generate/submit" \
--header "Authorization: Bearer $VIDGO_API_KEY" \
--header "Content-Type: application/json" \
--data "$REQUEST_BODY")
TASK_ID=$(printf '%s' "$SUBMIT_RESPONSE" | jq -r '.data.task_id // .task_id // empty')
if [ -z "$TASK_ID" ]; then
printf 'Submit response did not include task_id:
%s
' "$SUBMIT_RESPONSE" >&2
exit 1
fi
while true; do
STATUS_RESPONSE=$(curl --silent --show-error --fail-with-body \
--url "https://api.vidgo.ai/api/generate/status/$TASK_ID" \
--header "Authorization: Bearer $VIDGO_API_KEY")
STATUS=$(printf '%s' "$STATUS_RESPONSE" | jq -r '.data.status // .status // empty')
case "$STATUS" in
finished)
printf '%s' "$STATUS_RESPONSE" | jq -r '(.data.files // .files // [])[]?.file_url'
break
;;
failed)
printf '%s' "$STATUS_RESPONSE" | jq -r '.data.error_message // .error_message // "Generation failed"' >&2
exit 1
;;
not_started|running)
sleep 2
;;
*)
printf 'Unexpected task status: %s
' "$STATUS" >&2
exit 1
;;
esac
doneRequest Parameters
model and callback_url belong at the request root; generation parameters belong inside input.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| model | string | Yes | — | Fixed to vidu/q4/reference-to-video. |
| callback_url | string (URL) | No | — | A public HTTP(S) URL for receiving task completion notifications. |
| input | object | Yes | — | Generation parameters: a prompt plus 1–12 reference images, with optional voice clips, aspect ratio and audio generation. |
| input.prompt | string | Yes | — | Scene description, up to 5,000 characters, not blank. Refer to inputs as [@reference_image_1], [@reference_audio_1] and so on, numbered by array order. |
| input.reference_image_urls | string[] | Yes | — | 1–12 public HTTP(S) image URLs for characters, products and locations. |
| input.reference_audio_urls | string[] | No | — | Up to 3 public HTTP(S) audio URLs used as voice references. Short, clean MP3 clips of about 3–12 seconds work best. |
| input.duration | integer | No | 5 | Output length in whole seconds, 3–16. Integer strings such as "5" are also accepted. |
| input.resolution | string | No | 720p | Output resolution: 540p, 720p, 1080p, 2k or 4k (case-insensitive). The rate per second follows this value. |
| input.aspect_ratio | string | No | — | 16:9, 9:16, 4:3, 3:4 or 1:1. Omit it to keep the model default. |
| input.generate_audio | boolean | No | — | Set true to generate an audio track. The price stays the same. |
| input.enable_safety_checker | boolean | No | — | Set true or false to control the content safety checker; omit it to keep the model default. |
Response Fields
Submission returns the task identity immediately. Status responses add progress, output files, or a failure message as the task advances.
| Field | Type | Description |
|---|---|---|
| code | integer | Application result code. Successful responses use 0 or 200. |
| message | string | Human-readable response or error message when present. |
| data.task_id | string | Task identifier used in the status endpoint path. |
| data.status | string | Current state: not_started, running, finished, or failed. |
| data.created_time | string | Task creation time in date-time format. |
| data.progress | number | Completion percentage when the provider reports progress. |
| data.files[] | array | Generated output files returned after a successful task. |
| data.files[].file_url | string | Public URL of the generated video. |
| data.files[].file_type | string | Generated file type, such as video. |
| data.files[].watermark_url | string | null | Watermarked output URL when one is available. |
| data.error_message | string | null | Failure detail when status is failed. |
Task Lifecycle
Treat not_started and running as non-terminal states. finished and failed are terminal alternatives; stop polling when either is returned.
not_startedThe task has been accepted and is queued to start.
runningThe video is being generated. Continue polling the status endpoint.
finishedThe task is complete. Read the video URL from data.files[].file_url.
failedGeneration failed. Read data.error_message for details and stop polling.
Polling and Errors
- Authentication401 indicates a missing or invalid Bearer API Key. Check your key in the dashboard before retrying.
- Validation400 indicates invalid parameters. Check the prompt, the 1–12 image and 0–3 audio limits, and that image_urls is not sent.
- Polling intervalPoll the status every 2 seconds. For longer tasks, use exponential backoff to gradually increase the interval to 5 seconds.
- Terminal statesPoll only while the status is not_started or running. Stop immediately on finished or failed.
- Callback optionProvide callback_url to receive an automatic notification when generation finishes, without continuous polling.
Model Specifications
| Specification | Value | Description |
|---|---|---|
| Model | vidu/q4/reference-to-video | Model identifier for asynchronous Vidu Q4 reference-to-video generation. |
| Input mode | Prompt + 1–12 images + 0–3 audio | Reference tags in the prompt follow array order. |
| Aspect ratio | 16:9 | 9:16 | 4:3 | 3:4 | 1:1 | Optional. |
| Duration | 3–16 | Whole seconds; defaults to 5. |
| Resolution | 540p | 720p | 1080p | 2k | 4k | Defaults to 720p. |
| Pricing | 9 / 19 / 24 / 38 / 78 credits/s | 540p / 720p / 1080p / 2k / 4k, multiplied by duration. |
Related Models
Vidu Q4 Reference to Video API FAQ
What is the Vidu Q4 Reference to Video API?
Vidu Q4 Reference to Video is a ShengShu Technology model for generating video from reference material. It builds 3–16 second clips at up to 4K from a prompt, 1–12 reference images and up to 3 voice clips, with five aspect ratios and optional generated audio. Prompt tags tie each reference to a role, keeping characters, products and places recognisable while the scene unfolds. You can call it programmatically or try it from the playground above.
How many reference images does Vidu Q4 Reference to Video accept?
Between 1 and 12 images in reference_image_urls. Use separate images for each character, product or location and refer to them in the prompt by number.
How do voice references work in Vidu Q4 Reference to Video?
Add up to 3 clips to reference_audio_urls and tag them as [@reference_audio_1] and so on next to the character who should speak. Short, clean MP3 clips of about 3–12 seconds work best.
How do I tag references in a Vidu Q4 Reference to Video prompt?
Write [@reference_image_1], [@reference_image_2] or [@reference_audio_1], numbered by the order of each array, at the point where that element should appear or speak.
Does generated audio cost extra on Vidu Q4 Reference to Video?
No. generate_audio, reference images and reference audio leave the rate unchanged; credits are resolution rate × duration, for example 95 credits for 5 seconds at 720p.
Which aspect ratios can Vidu Q4 Reference to Video output?
16:9, 9:16, 4:3, 3:4 and 1:1 through aspect_ratio. Leave it unset to use the model default.
How long can a Vidu Q4 Reference to Video clip be?
3 to 16 whole seconds, 5 by default, at 540p, 720p, 1080p, 2k or 4k.
When should I choose Vidu Q4 Reference to Video over Image to Video?
Choose Reference to Video when several characters, products or places must appear, when you need voice references, or when you want a fixed aspect ratio. Image to Video starts from one exact frame.















