# Vidu Q4

> Vidu Q4 on the Kinovi API — image-to-video and reference-to-video from 540p up to native 4K, 3–16 s clips with up to 15 reference images and 3 audio clips.

Source: https://kinovi.ai/docs/models/vidu-q4

- Model ID: `q4/image-to-video`
- Type: Video
- Provider: Vidu
- From: $0.0426 / s
- Model page: https://kinovi.ai/models/viduq4-image-to-video
- Playground: https://kinovi.ai/app/gallery?model=q4%2Fimage-to-video

## Models in this series

Vidu Q4 ships two public faces — it does not have a pure text-to-video endpoint.

| Model ID | Mode | Inputs | Model page |
|:--|:--|:--|:--|
| `q4/image-to-video` | Image to video | Exactly 1 first-frame image (`imageUrls`) + optional prompt | [Q4 Image to Video](https://kinovi.ai/models/viduq4-image-to-video) |
| `q4/reference-to-video` | Reference to video | 1–15 reference images (`imageUrls`) + optional 1–3 MP3 audio clips (`audioUrls`) + required prompt | [Q4 Reference to Video](https://kinovi.ai/models/viduq4-reference-to-video) |

## Quickstart

Two calls: submit a task with `createTask`, then poll `recordInfo` with the returned `taskId` until `status` is `success` or `fail`.

Every request carries `Authorization: Bearer <yourApiKey>`. Create and manage keys at [kinovi.ai/api-keys](https://kinovi.ai/api-keys); see the [API reference](https://kinovi.ai/docs/api) for rate limits and error codes.

### Submit a task

`POST https://kinovi.ai/api/v1/jobs/createTask`

```json
{
  "model": "q4/image-to-video",
  "inputs": {
    "prompt": "The camera slowly pushes in as steam rises from the cup and sunlight shifts across the wooden table.",
    "imageUrls": [
      "https://static.kinovi.ai/generated-images/task_ff01ii3zvib7ndbx8negnh6q-0.png"
    ],
    "duration": 5,
    "resolution": "720p",
    "generateAudio": true
  }
}
```

Response `200 OK` — the task is queued and credits are reserved. Use `taskId` to poll for the result.

```json
{
  "taskId": "task_01j9exampleviduq40001"
}
```

#### Error responses

| HTTP | Body | When |
|:--|:--|:--|
| `400` | `{ "message": "Invalid inputs for model", "errors": [ … ] }` | Wrong image count (`q4/image-to-video` requires exactly 1 image; `q4/reference-to-video` requires 1–15), `aspectRatio` or `audioUrls` sent to `q4/image-to-video`, missing `prompt` on `q4/reference-to-video`, or `duration` outside `3`–`16`. Nothing is charged. |
| `401` | `{ "message": "Invalid API Key" }` | Missing or wrong `Authorization` header. |
| `402` | `{ "message": "Insufficient credits", "required": 97, "available": 0 }` | Not enough credits for this duration × resolution. |
| `429` | `{ "message": "Concurrency limit reached (…)", "limit": 5, "current": 5 }` | Too many tasks in progress; wait for one to finish. |

### Query the result

`GET https://kinovi.ai/api/v1/jobs/recordInfo?taskId=task_…`

Poll every few seconds until `status` is `success` or `fail`.

| `status` | Meaning |
|:--|:--|
| `waiting` | Queued, not started yet |
| `generating` | Running |
| `success` | Done — read `output[].url` |
| `fail` | Failed — see `error.code` / `error.message`; credits are refunded |

## Parameters

Send these inside the `createTask` body. Everything optional falls back to the default shown.

Reference media fields take any publicly reachable URL — host the files yourself, or upload them to Kinovi first with `POST /api/v1/uploads` and pass the returned `url` (see [Uploading Assets](https://kinovi.ai/docs/uploads)).

| Field | Type | Default | Applies to | Description |
|:--|:--|:--|:--|:--|
| `model` | `string` | **required** | All | `q4/image-to-video` · `q4/reference-to-video`. |
| `inputs.imageUrls` | `string[]` | **required** | All | `q4/image-to-video`: **exactly 1** first-frame image (PNG, JPEG, or WebP, ≤ 50 MB). `q4/reference-to-video`: **1–15** reference images cited as `@Image1`, `@Image2`… Your own hosted URLs or [Kinovi uploads](https://kinovi.ai/docs/uploads). |
| `inputs.prompt` | `string` | – | I2V (optional), Ref (**required**) | Motion and scene description, max **20,000** characters. |
| `inputs.audioUrls` | `string[]` | – | Ref only | Up to **3** MP3 audio clips, each **3–12 s** and ≤ 50 MB. Cite in prompt as `@Audio1`, `@Audio2`… Rejected on `q4/image-to-video`. Your own hosted URLs or [Kinovi uploads](https://kinovi.ai/docs/uploads). |
| `inputs.aspectRatio` | `string` | `16:9` | Ref only | `16:9` · `9:16` · `1:1` · `4:3` · `3:4`. Rejected on `q4/image-to-video` (which always follows the first frame's ratio). |
| `inputs.duration` | `integer` | `5` | All | Clip length in whole seconds, `3` to `16`. |
| `inputs.resolution` | `string` | `720p` | All | `540p` · `720p` · `1080p` · `2K` · `4K` (case-insensitive). |
| `inputs.generateAudio` | `boolean` | `true` | All | Generate synced audio. Set `false` for a silent clip. |
| `inputs.seed` | `integer` | random | All | `0`–`2147483647`. |
| `callBackUrl` | `string` | – | All | Optional webhook called when the task finishes. |

`inputs.imageUrl` and `inputs.uploadedUrls` are accepted as mutually exclusive aliases for `inputs.imageUrls`.

### Full request (`q4/reference-to-video`)

```json
{
  "model": "q4/reference-to-video",
  "inputs": {
    "prompt": "The woman from @Image1 walks through the sunlit courtyard from @Image2 while speaking in the tone of @Audio1.",
    "imageUrls": [
      "https://static.kinovi.ai/generated-images/task_ff01ii3zvib7ndbx8negnh6q-0.png",
      "https://static.kinovi.ai/generated-images/task_u91bn4h34rr0zy2m5o9z31si-0.png"
    ],
    "audioUrls": [
      "https://example.com/voice-sample.mp3"
    ],
    "aspectRatio": "16:9",
    "duration": 5,
    "resolution": "1080p",
    "generateAudio": true,
    "seed": 42
  },
  "callBackUrl": "https://example.com/hooks/kinovi"
}
```

## Pricing

Both `q4/image-to-video` and `q4/reference-to-video` share the same per-second rates by `resolution`. Reference images and audio do not add extra charges. Live prices: [Q4 Image to Video](https://kinovi.ai/models/viduq4-image-to-video) · [Q4 Reference to Video](https://kinovi.ai/models/viduq4-reference-to-video).

| | 540p | 720p | 1080p | 2K | 4K |
|:--|--:|--:|--:|--:|--:|
| **per second** | $0.0426 / s | $0.0900 / s | $0.1137 / s | $0.1800 / s | $0.3695 / s |

`duration` × the rate is charged at submit; failed tasks are refunded in full.

## Response

### Result fields

**JSON**

```json
{
  "taskId": "task_01j9exampleviduq40001",
  "model": "q4/image-to-video",
  "status": "success",
  "creditsUsed": 97.0,
  "output": [
    {
      "url": "https://static.kinovi.ai/videos/viduq4_example.mp4",
      "width": 1280,
      "height": 720,
      "mediaType": "video/mp4"
    }
  ],
  "error": null,
  "createTime": 1790090613532,
  "completeTime": 1790090762100
}
```

**Table**

| Field | Type | Description |
|:--|:--|:--|
| `taskId` | `string` | The task id returned by `createTask`. |
| `model` | `string` | `"q4/image-to-video"` or `"q4/reference-to-video"`. |
| `status` | `string` | `waiting` · `generating` · `success` · `fail`. Stop polling on `success` or `fail`. |
| `creditsUsed` | `number` | Credits actually charged. Refunded automatically when `status` is `fail`. |
| `output` | `object[]` | Generated video; empty until `success`. Stored by Kinovi for 7 days after generation. |
| `output[0].url` | `string` | Download URL of the `.mp4` clip. |
| `output[0].width` | `integer` | Pixel width. |
| `output[0].height` | `integer` | Pixel height. |
| `output[0].mediaType` | `string` | `video/mp4`. |
| `error` | `object \| null` | `{ code, message }` when the task failed, otherwise `null`. |
| `createTime` | `number` | Unix epoch milliseconds when the task was accepted. |
| `completeTime` | `number \| null` | Unix epoch milliseconds when the task reached a terminal status. |

## Examples

### Image to video (`q4/image-to-video`)

**cURL**

```bash
curl -sS -X POST "https://kinovi.ai/api/v1/jobs/createTask" \
  -H "Authorization: Bearer $KINOVI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "q4/image-to-video",
    "inputs": {
      "prompt": "Gentle camera dolly-in with natural wind moving through the hair and leaves.",
      "imageUrls": ["https://static.kinovi.ai/generated-images/task_ff01ii3zvib7ndbx8negnh6q-0.png"],
      "duration": 5,
      "resolution": "1080p",
      "generateAudio": true
    }
  }'
```

**Node.js**

```ts
const API_BASE = "https://kinovi.ai/api/v1";
const headers = {
  Authorization: `Bearer ${process.env.KINOVI_API_KEY}`,
  "Content-Type": "application/json",
};

const { taskId } = await fetch(`${API_BASE}/jobs/createTask`, {
  method: "POST",
  headers,
  body: JSON.stringify({
    model: "q4/image-to-video",
    inputs: {
      prompt: "Gentle camera dolly-in with natural wind moving through the hair and leaves.",
      imageUrls: ["https://static.kinovi.ai/generated-images/task_ff01ii3zvib7ndbx8negnh6q-0.png"],
      duration: 5,
      resolution: "1080p",
      generateAudio: true,
    },
  }),
}).then((r) => r.json());

while (true) {
  const info = await fetch(`${API_BASE}/jobs/recordInfo?taskId=${encodeURIComponent(taskId)}`, { headers }).then((r) =>
    r.json(),
  );
  if (info.status === "success") {
    console.log(info.output[0].url);
    break;
  }
  if (info.status === "fail") throw new Error(JSON.stringify(info.error));
  await new Promise((r) => setTimeout(r, 3000));
}
```

**Python**

```python
import json, os, time, urllib.request

API_BASE = "https://kinovi.ai/api/v1"
HEADERS = {
    "Authorization": f"Bearer {os.environ['KINOVI_API_KEY']}",
    "Content-Type": "application/json",
}

payload = {
    "model": "q4/image-to-video",
    "inputs": {
        "prompt": "Gentle camera dolly-in with natural wind moving through the hair and leaves.",
        "imageUrls": ["https://static.kinovi.ai/generated-images/task_ff01ii3zvib7ndbx8negnh6q-0.png"],
        "duration": 5,
        "resolution": "1080p",
        "generateAudio": True,
    },
}

req = urllib.request.Request(f"{API_BASE}/jobs/createTask", data=json.dumps(payload).encode(), headers=HEADERS)
task_id = json.load(urllib.request.urlopen(req))["taskId"]

while True:
    info = json.load(urllib.request.urlopen(urllib.request.Request(f"{API_BASE}/jobs/recordInfo?taskId={task_id}", headers=HEADERS)))
    if info["status"] == "success":
        print(info["output"][0]["url"])
        break
    if info["status"] == "fail":
        raise RuntimeError(info["error"])
    time.sleep(3)
```

### Reference to video (`q4/reference-to-video`)

**cURL**

```bash
curl -sS -X POST "https://kinovi.ai/api/v1/jobs/createTask" \
  -H "Authorization: Bearer $KINOVI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "q4/reference-to-video",
    "inputs": {
      "prompt": "The character from @Image1 sets down the ceramic mug from @Image2 on a cafe counter, warm afternoon light.",
      "imageUrls": [
        "https://static.kinovi.ai/generated-images/task_ff01ii3zvib7ndbx8negnh6q-0.png",
        "https://static.kinovi.ai/generated-images/task_u91bn4h34rr0zy2m5o9z31si-0.png"
      ],
      "aspectRatio": "16:9",
      "duration": 5,
      "resolution": "720p"
    }
  }'
```

**Node.js**

```ts
const res = await fetch("https://kinovi.ai/api/v1/jobs/createTask", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.KINOVI_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    model: "q4/reference-to-video",
    inputs: {
      prompt: "The character from @Image1 sets down the ceramic mug from @Image2 on a cafe counter, warm afternoon light.",
      imageUrls: [
        "https://static.kinovi.ai/generated-images/task_ff01ii3zvib7ndbx8negnh6q-0.png",
        "https://static.kinovi.ai/generated-images/task_u91bn4h34rr0zy2m5o9z31si-0.png",
      ],
      aspectRatio: "16:9",
      duration: 5,
      resolution: "720p",
    },
  }),
});
console.log(await res.json());
```

**Python**

```python
import json, os, urllib.request

payload = {
    "model": "q4/reference-to-video",
    "inputs": {
        "prompt": "The character from @Image1 sets down the ceramic mug from @Image2 on a cafe counter, warm afternoon light.",
        "imageUrls": [
            "https://static.kinovi.ai/generated-images/task_ff01ii3zvib7ndbx8negnh6q-0.png",
            "https://static.kinovi.ai/generated-images/task_u91bn4h34rr0zy2m5o9z31si-0.png",
        ],
        "aspectRatio": "16:9",
        "duration": 5,
        "resolution": "720p",
    },
}
req = urllib.request.Request(
    "https://kinovi.ai/api/v1/jobs/createTask",
    data=json.dumps(payload).encode(),
    headers={"Authorization": f"Bearer {os.environ['KINOVI_API_KEY']}", "Content-Type": "application/json"},
)
print(json.load(urllib.request.urlopen(req)))
```

## Notes

- **Reference citations**: On `q4/reference-to-video`, cite reference images as `@Image1`, `@Image2`, … and reference audio clips as `@Audio1`, `@Audio2`, …
- **Audio clip rules**: Each clip in `inputs.audioUrls` must be an MP3 file between **3 and 12 seconds** long and ≤ 50 MB.

## FAQ

### Does Vidu Q4 support text-to-video?

No. Vidu Q4 only offers `q4/image-to-video` (1 first-frame image) and `q4/reference-to-video` (1–15 reference images).

### Why did `q4/image-to-video` reject my `aspectRatio` field?

`q4/image-to-video` always follows the aspect ratio of the input first-frame image; omit `aspectRatio` on that face.

### Can I generate 4K video with Vidu Q4?

Yes — pass `"resolution": "4K"` (or `"2K"`) on either `q4/image-to-video` or `q4/reference-to-video`.

## Related models

- [Kling 4.0](https://kinovi.ai/docs/models/kling-4.0): Kuaishou's Kling 4.0 with text-to-video, up to 10 keyframes, and reference-to-video.
- [Seedance 2.5](https://kinovi.ai/docs/models/seedance2-5): ByteDance's Seedance 2.5 supporting text, keyframes, and multimodal references up to 30 s.
- [MAGI-2](https://kinovi.ai/docs/models/magi-2): Sand AI's native 1080p video generation across text, first/last frames, and multimodal references.
