Vidu Q4 Preview Reference-to-Video Spicy
Learn how to build and deploy AI applications with iCreat.
Vidu Q4 Preview Reference-to-Video Spicy
Vidu Q4 Preview Reference-to-Video Spicy (vidu/q4-preview-global) is Vidu's next-generation multimodal video generation model, offering high-consistency multi-subject reference generation alongside flexible first-frame and first-to-last frame image-to-video capabilities through a unified endpoint. It supports up to 15 reference images and up to 2 reference audio tracks (sounds) in reference mode, or 1–2 frame images in image mode. Capable of generating 4 to 16-second videos at resolutions ranging from 540p up to 4K (540p, 720p, 1080p, 2K, 4K) with native audio synthesis, it delivers cinematic motion, accurate subject consistency, and synchronized audio-visual storytelling across mainstream aspect ratios (16:9, 9:16, 3:4, 4:3, 1:1).
Base URL
https://api.icreat.aiAuthentication
All API requests must be authenticated with an API Key. You can obtain an API Key from the console.
export ICREAT_API_KEY="your-api-key-here"HTTP Request Headers
import os
API_KEY = os.environ.get("ICREAT_API_KEY")
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer " + API_KEY,
}
Protect your API Key Never expose your API Key in client-side code or public repositories. Use environment variables or a backend proxy.
Code Examples
Image and video generation uses a two-step async flow: submit a task to get task_id, then poll via query task result; the response includes status and result ([] while processing; on SUCCEEDED, result holds resources and costUSD is present). The examples below use the same task_id across both steps.
1. Submit Task
Send a generation request to the submit endpoint using a flat top-level JSON body. Both Reference-to-Video (mode: "reference") and Image-to-Video (mode: "image") share the same endpoint URL.
2. Query Task Result (Poll)
Use the task_id from submit to poll progress (repeat until terminal). The response includes status and result: result is [] while processing; on SUCCEEDED, result holds resources and costUSD is included; FAILED means the task failed.
Input Schema
Submit Task — Input
The request body is a flat top-level JSON object (do not wrap fields in input or parameters).
Total: 10 (prompt is also required when mode is "reference") Optional: 9
List of publicly accessible HTTPS (or HTTP) image URLs.
-
When
modeisreference: requires 1–15 reference images. -
When
modeisimage: requires 1–2 images (1image for first-frame image-to-video;2images for first-to-last frame transition).
Generation mode (case-insensitive). Set to reference for Reference-to-Video generation, or image for first-frame / first-to-last frame Image-to-Video generation.
Text prompt describing the video to generate (up to 2000 Unicode characters). **Required and must be non-empty when mode is reference**; optional when mode is image.
List of publicly accessible HTTPS (or HTTP) reference audio URLs. Defaults to []. Supported only when mode is reference (up to 2 audio files). Passing a non-empty array when mode is image will directly return an HTTP 400 error.
Video duration in seconds.
Min: 4 Max: 16
Video output resolution (case-insensitive).
Output video aspect ratio. Effective only when mode is reference. Do not pass this field when mode is image (in image mode, the aspect ratio is automatically derived from the first frame).
Whether to generate an audio track. Set to false to explicitly disable audio output (evaluated independently as a boolean regardless of whether sounds is provided).
Whether to use AI-recommended prompt expansion. Available only when mode is image; do not pass this parameter when mode is reference.
Random seed for generation. If omitted, a random seed is used; specify an integer to fix the generation seed.
Query Task Result — Input
Total: 1 Required: 1 Optional: 0
The task ID returned from the submit endpoint.
Output Schema
Submit Task — Output
Total: 1
Async task identifier.
Query Task Result — Output
Total: variable
Current task status. result is usually [] until success; on SUCCEEDED, result holds resources and costUSD is present.
Generated resources. Empty array while processing or on failure; array of objects on success.
Task cost in USD. Present only when status is SUCCEEDED.
LLM Prompt
The Markdown below is an LLM-friendly prompt you can paste into AI assistants (e.g. Cursor, ChatGPT) to help them understand this model's API, call flow, and key parameters. Use Copy for AI or copy from the code block below.
# vidu/q4-preview-global
> Vidu Q4 Preview Reference-to-Video Spicy (`vidu/q4-preview-global`) is Vidu's next-generation video generation model supporting multi-image/audio Reference-to-Video (`mode: "reference"`) and first-frame / first-to-last frame Image-to-Video (`mode: "image"`) via a single unified endpoint.
## Overview
Use the iCreat two-step async task API: submit a generation request with a flat JSON body, then poll the query task result endpoint; on success read resources from `result` (includes `costUSD`).
## API Info
- **Base URL**:`https://api.icreat.ai`
- **Submit endpoint (POST)**:`/v1/task/submit/vidu/q4-preview-global`
- **Query result endpoint (POST)**:`/v1/task/result`
- **Model ID**:`vidu/q4-preview-global`
- **Auth**:`Authorization: Bearer ${ICREAT_API_KEY}`
## Call Flow
1. **Submit**: POST submit path with a flat JSON body per Input Notes; response `{ "task_id": "..." }`
2. **Query result**: POST `/v1/task/result` with `{ "task_id": "..." }`; response includes `status` and `result` (`[]` while processing); on `SUCCEEDED`, `result` holds resources and `costUSD` is present; read `url` or `download_url` when `type` is `Video`
### Input Example (Reference-to-Video)
```json
{
"mode": "reference",
"images": [
"https://example.com/ref-scene.jpg](https://example.com/ref-scene.jpg"
],
"sounds": [
"https://example.com/ref-voice.mp3](https://example.com/ref-voice.mp3"
],
"prompt": "Generate a 5-second short clip based on the reference image and reference audio.",
"duration": 5,
"resolution": "720p",
"aspectRatio": "16:9",
"audio": true,
"seed": 42
}
Input Notes
- Top-level body: Flat JSON object (do NOT wrap in
inputorparameters). mode(optional):"image"(default) or"reference"(case-insensitive).images(required): Array of image HTTP/HTTPS URLs.1–15images whenmode="reference";1–2images whenmode="image"(1 for first-frame, 2 for first-to-last frame).prompt(conditional): Required and non-empty whenmode="reference"; optional whenmode="image". Max 2000 Unicode characters.sounds(optional): Array of audio HTTP/HTTPS URLs (max 2). Supported ONLY whenmode="reference". Passing non-emptysoundsinimagemode causes a 400 error.duration(optional): Integer4–16seconds (default5).resolution(optional):"540p","720p"(default),"1080p","2K", or"4K"(case-insensitive).aspectRatio(optional):"16:9"(default),"9:16","3:4","4:3", or"1:1". Effective ONLY whenmode="reference"; do NOT pass whenmode="image".audio(optional): Boolean (defaulttrue). Set tofalseto mute audio output.isRec(optional): Boolean. AI prompt recommendation, supported ONLY whenmode="image"; do NOT pass whenmode="reference".seed(optional): Integer seed for reproducibility.
Output Notes
- Poll: read
status;resultis[]while processing (SUBMITTEDorIN_PROGRESS) - Success:
statusisSUCCEEDED,resultis[{ "type": "Video", "url": "...", "download_url": "..." }]pluscostUSD
Notes
- Use the same
task_idacross both steps;resultis[]while processing — keep polling FAILEDandNOT_FOUNDare terminal — do not keep polling; check request parameters or media URLs- Generated media URLs are temporary; download and persist the video promptly rather than hardcoding the temporary URL
