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.ai

Authentication

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.

POST/v1/task/submit/vidu/q4-preview-global

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.

POST/v1/task/result

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

imagesarray[string]required

List of publicly accessible HTTPS (or HTTP) image URLs.

  • When mode is reference: requires 1–15 reference images.

  • When mode is image: requires 1–2 images (1 image for first-frame image-to-video; 2 images for first-to-last frame transition).

modestringrequired

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.

imagereference
promptstringrequired

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.

soundsarray[string]

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.

durationintegerrequired

Video duration in seconds.

Min: 4 Max: 16

Default"5"
resolutionstringrequired

Video output resolution (case-insensitive).

Default"720p"
540p720p1080p2K4K
aspectRatiostringrequired

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).

Default"16:9"
16:99:163:44:31:1
audioboolean

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).

Default"true"
isRecboolean

Whether to use AI-recommended prompt expansion. Available only when mode is image; do not pass this parameter when mode is reference.

seedinteger

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

task_idstringrequired

The task ID returned from the submit endpoint.

Output Schema

Submit Task — Output

Total: 1

task_idstring

Async task identifier.

Query Task Result — Output

Total: variable

statusstring

Current task status. result is usually [] until success; on SUCCEEDED, result holds resources and costUSD is present.

SUBMITTEDIN_PROGRESSSUCCEEDEDFAILEDNOT_FOUND
resultarray[object]

Generated resources. Empty array while processing or on failure; array of objects on success.

costUSDnumber

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 input or parameters).
  • mode (optional): "image" (default) or "reference" (case-insensitive).
  • images (required): Array of image HTTP/HTTPS URLs. 1–15 images when mode="reference"; 1–2 images when mode="image" (1 for first-frame, 2 for first-to-last frame).
  • prompt (conditional): Required and non-empty when mode="reference"; optional when mode="image". Max 2000 Unicode characters.
  • sounds (optional): Array of audio HTTP/HTTPS URLs (max 2). Supported ONLY when mode="reference". Passing non-empty sounds in image mode causes a 400 error.
  • duration (optional): Integer 4–16 seconds (default 5).
  • 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 when mode="reference"; do NOT pass when mode="image".
  • audio (optional): Boolean (default true). Set to false to mute audio output.
  • isRec (optional): Boolean. AI prompt recommendation, supported ONLY when mode="image"; do NOT pass when mode="reference".
  • seed (optional): Integer seed for reproducibility.

Output Notes

  • Poll: read status; result is [] while processing (SUBMITTED or IN_PROGRESS)
  • Success: status is SUCCEEDED, result is [{ "type": "Video", "url": "...", "download_url": "..." }] plus costUSD

Notes

  • Use the same task_id across both steps; result is [] while processing — keep polling
  • FAILED and NOT_FOUND are 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