# Kling 4.0

> Kling 4.0（可灵 4.0）是快手的视频生成模型，单次 3 到 30 秒，支持 720p、1080p 和 4K。可以只写提示词，也可以给首尾帧，或附上参考图、参考视频和参考音频。在 Studio 里选好分辨率和时长，生成前就能看到费用。

- **模型 ID**: `kuaishou/kling-4.0`
- **厂商**: Kuaishou
- **类型**: 视频 (`video`)
- **状态**: 已上线 (`live`)
- **超时上限**: 43200 s
- **典型耗时**: ~822 s
- **接口**: `POST https://api.kerox.ai/v1/tasks`
- **网页**: https://kerox.ai/zh/docs/models/kuaishou/kling-4.0

## 请求示例

提交任务，马上拿到 id；结果用下面的轮询或 [Webhook](https://kerox.ai/zh/docs/webhooks.md) 拿。`webhook_url` 和 `metadata` 选填。使用 Webhook 时，把真实的公网 HTTPS 地址填入 `webhook_url`。全部字段见[提交任务](https://kerox.ai/zh/docs/tasks.md#submit-body)。

需要 API Key（`KEROX_API_KEY`）。轮询示例需要 Bash、curl 和 jq。Python 示例需先运行 `pip install requests`。

### cURL

```bash
curl --fail-with-body -X POST https://api.kerox.ai/v1/tasks \
  -H "Authorization: Bearer $KEROX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "kuaishou/kling-4.0",
  "input": {
    "prompt": "a red fox running through fresh snow, cinematic lighting",
    "resolution": "720p",
    "duration": 5,
    "aspect_ratio": "16:9"
  }
}'
```

### Python

```python
import os
import requests

resp = requests.post(
    "https://api.kerox.ai/v1/tasks",
    headers={
        "Authorization": f"Bearer {os.environ['KEROX_API_KEY']}",
        "Content-Type": "application/json",
    },
    json={
        "model": "kuaishou/kling-4.0",
        "input": {
            "prompt": "a red fox running through fresh snow, cinematic lighting",
            "resolution": "720p",
            "duration": 5,
            "aspect_ratio": "16:9",
        },
    },
    timeout=60,
)
resp.raise_for_status()
task = resp.json()
print(task["id"], task["status"])  # 保存 id 用于轮询
```

### Node.js

```javascript
const res = await fetch('https://api.kerox.ai/v1/tasks', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.KEROX_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "model": "kuaishou/kling-4.0",
    "input": {
      "prompt": "a red fox running through fresh snow, cinematic lighting",
      "resolution": "720p",
      "duration": 5,
      "aspect_ratio": "16:9"
    }
  }),
});
const task = await res.json();
if (!res.ok) throw new Error(JSON.stringify(task));
console.log(task.id, task.status); // 保存 id 用于轮询
```

### Go

```go
package main

import (
	"bytes"
	"fmt"
	"io"
	"net/http"
	"os"
	"time"
)

func main() {
	body := []byte(`{
  "model": "kuaishou/kling-4.0",
  "input": {
    "prompt": "a red fox running through fresh snow, cinematic lighting",
    "resolution": "720p",
    "duration": 5,
    "aspect_ratio": "16:9"
  }
}`)
	req, _ := http.NewRequest("POST", "https://api.kerox.ai/v1/tasks", bytes.NewReader(body))
	req.Header.Set("Authorization", "Bearer "+os.Getenv("KEROX_API_KEY"))
	req.Header.Set("Content-Type", "application/json")
	client := &http.Client{Timeout: 60 * time.Second}
	resp, err := client.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()
	out, _ := io.ReadAll(resp.Body)
	if resp.StatusCode >= 400 {
		fmt.Fprintln(os.Stderr, string(out))
		os.Exit(1)
	}
	fmt.Println(string(out))
}
```

### 参考图

```bash
curl --fail-with-body -X POST https://api.kerox.ai/v1/tasks \
  -H "Authorization: Bearer $KEROX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "kuaishou/kling-4.0",
  "input": {
    "prompt": "Show the red paper sailboat under warm copper lights",
    "resolution": "720p",
    "duration": 5,
    "aspect_ratio": "16:9",
    "images": [
      "https://cdn.kerox.ai/assets/samples/kling-4.0/paper-sail-frame.jpg"
    ]
  }
}'
```

### 首帧

```bash
curl --fail-with-body -X POST https://api.kerox.ai/v1/tasks \
  -H "Authorization: Bearer $KEROX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "kuaishou/kling-4.0",
  "input": {
    "prompt": "Track the red paper sailboat as it drifts across the pool",
    "resolution": "720p",
    "duration": 5,
    "aspect_ratio": "16:9",
    "first_frame": "https://cdn.kerox.ai/assets/samples/kling-4.0/paper-sail-frame.jpg"
  }
}'
```

### 首尾帧

```bash
curl --fail-with-body -X POST https://api.kerox.ai/v1/tasks \
  -H "Authorization: Bearer $KEROX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "kuaishou/kling-4.0",
  "input": {
    "prompt": "Circle the red paper sailboat and return to the starting view",
    "resolution": "720p",
    "duration": 5,
    "aspect_ratio": "16:9",
    "first_frame": "https://cdn.kerox.ai/assets/samples/kling-4.0/paper-sail-frame.jpg",
    "last_frame": "https://cdn.kerox.ai/assets/samples/kling-4.0/paper-sail-frame.jpg"
  }
}'
```

### 参考视频

```bash
curl --fail-with-body -X POST https://api.kerox.ai/v1/tasks \
  -H "Authorization: Bearer $KEROX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "kuaishou/kling-4.0",
  "input": {
    "prompt": "Use the camera motion of Video 1 for a flyover of a rocky coastline",
    "resolution": "720p",
    "duration": 5,
    "aspect_ratio": "16:9",
    "videos": [
      "https://cdn.kerox.ai/assets/samples/kling-4.0-flash/motion-reference.mp4"
    ]
  }
}'
```

### 参考音频

```bash
curl --fail-with-body -X POST https://api.kerox.ai/v1/tasks \
  -H "Authorization: Bearer $KEROX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "kuaishou/kling-4.0",
  "input": {
    "prompt": "Show a dinosaur at dusk and time its roar to Audio 1",
    "resolution": "720p",
    "duration": 5,
    "aspect_ratio": "16:9",
    "audios": [
      "https://interactive-examples.mdn.mozilla.net/media/cc0-audio/t-rex-roar.mp3"
    ]
  }
}'
```

## 参数

[参数名](https://kerox.ai/zh/docs/models.md)在所有模型上意思相同。

| 参数 | 类型 | 必填 | 默认值 | 可选值 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- | --- |
| `prompt` | string | 是 | — | 至少一个非空白字符；至少 1 个字符 | 描述要生成什么的文字。 | `"A lighthouse at dawn"` |
| `keep_original_sound` | boolean | 否 | — | true, false | 使用参考视频中的原声，须同时传 videos。 | `true` |
| `images` | string \| string[] | 否 | — | 单个公开 HTTPS 地址；可传单个字符串，或含 1–10 项的数组 | 供模型参考的图片，顺序就是提示词里指代它们的顺序。 | `"https://example.com/photo.png"` |
| `videos` | string \| string[] | 否 | — | 单个公开 HTTPS 地址；可传单个字符串，或含 1–5 项的数组；模型文件限制：最多 5 段 MP4/MOV，合计最多 30 秒。量不到时长时拒单。合计时长向上取整。 | 供模型参考的视频，顺序就是提示词里指代它们的顺序。 | `"https://example.com/clip.mp4"` |
| `audios` | string \| string[] | 否 | — | 单个公开 HTTPS 地址；可传单个字符串，或含 1–3 项的数组；模型文件限制：最多 3 段，每段 5–30 秒。 | 供模型参考的音频，顺序就是提示词里指代它们的顺序。 | `"https://example.com/music.wav"` |
| `first_frame` | string | 否 | — | 单个公开 HTTPS 地址；模型文件限制：JPEG 或 PNG。尾帧需要首帧；不能与参考素材混用。 | 视频开头的那一帧画面。 | `"https://example.com/start.png"` |
| `last_frame` | string | 否 | — | 单个公开 HTTPS 地址；模型文件限制：JPEG 或 PNG。尾帧需要首帧；不能与参考素材混用。 | 视频结尾的那一帧画面，必须和 `first_frame` 一起用。 | `"https://example.com/end.png"` |
| `aspect_ratio` | string | 否 | — | 16:9, 9:16, 1:1, 21:9, auto | 输出画面宽和高的比例。 | `"16:9"` |
| `resolution` | string | 否 | `"720p"` | 720p, 1080p, 4K | 输出分辨率档位，具体像素由它和 `aspect_ratio` 一起决定。 | `"720p"` |
| `duration` | integer | 否 | `5` | 3–30 | 输出的时长，整数秒。 | `5` |
| `n` | integer | 否 | `1` | 1 | 一个任务最多生成几个结果。 | `1` |

- last_frame 需要 first_frame
- keep_original_sound 需要 videos
- first_frame 时，不可传 images 或 videos 或 audios
- aspect_ratio = "auto" 时，须传 images 或 videos 或 audios

图片、音频和视频可直接传公开 HTTPS 地址。本地媒体先用 `POST /v1/files` 上传，再传返回的 `url`。上传端支持的 MIME 和大小限制见[文件与输入](https://kerox.ai/zh/docs/files.md#presigned)。

暂不支持：`watermark`。

## 轮询与输出

轮询 `GET /v1/tasks/{id}`；或者提交时带上 `webhook_url`，完成时收到同一个任务对象，接入步骤见 [Webhook 回调](https://kerox.ai/zh/docs/webhooks.md)。结果文件在 `expires_at` 之后过期（完成后 7 天），想留的请下载。完整任务字段见[任务与轮询](https://kerox.ai/zh/docs/tasks.md#submit-response)。

将提交返回的 `id` 设为 `TASK_ID`。脚本最多等 10 分钟，任务失败时打印 `error`，成功则从 `outputs[].url` 下载每个文件。

```bash
(
  set -eu
  # TASK_ID 是提交请求返回的 id。
  : "${TASK_ID:?Set TASK_ID}"
  deadline=$((SECONDS + 600))
  while (( SECONDS < deadline )); do
    task=$(curl --fail-with-body --silent --show-error --max-time "$((deadline - SECONDS))" https://api.kerox.ai/v1/tasks/"$TASK_ID" \
      -H "Authorization: Bearer $KEROX_API_KEY")
    case $(jq -er .status <<< "$task") in
      succeeded)
        if ! jq -e '.outputs | length > 0' <<< "$task" >/dev/null; then
          echo "结果文件已不可用。" >&2
          exit 1
        fi
        i=0
        while IFS= read -r url; do
          file_path=${url%%\?*}
          filename="output-${i}.${file_path##*.}"
          curl --fail-with-body --silent --show-error --max-time 120 "$url" -o "$filename"
          printf "%s\n" "$filename"
          i=$((i + 1))
        done < <(jq -r '.outputs[].url' <<< "$task")
        exit 0 ;;
      failed) jq -c .error <<< "$task" >&2; exit 1 ;;
      processing) sleep 2 ;;
      *) echo "未知任务状态。" >&2; exit 1 ;;
    esac
  done
  echo "等待超时。保留 TASK_ID，稍后继续查询。" >&2
  exit 1
)
```

### 成功响应 JSON

以下为示例，实际扣费以账户价格和任务结果为准。

```json
{
  "id": "task_01JD8X9B4Q2M7T8N3K5P6R1S0V",
  "object": "task",
  "model": "kuaishou/kling-4.0",
  "status": "succeeded",
  "source": "api",
  "format": "unified",
  "input": {
    "prompt": "a red fox running through fresh snow, cinematic lighting",
    "resolution": "720p",
    "duration": 5,
    "aspect_ratio": "16:9"
  },
  "outputs": [
    {
      "type": "video",
      "url": "https://cdn.kerox.ai/t/task_01JD8X9B4Q2M7T8N3K5P6R1S0V/5f2b8c1e9d3a4f6b8a7c0d1e2f3a4b5c/0.mp4",
      "content_type": "video/mp4",
      "duration": 5
    }
  ],
  "outputs_deleted": false,
  "error": null,
  "cost": {
    "amount": "0.7065",
    "currency": "USD",
    "status": "settled"
  },
  "metadata": null,
  "warnings": [],
  "created_at": "2026-11-20T08:00:00Z",
  "started_at": "2026-11-20T08:00:01Z",
  "completed_at": "2026-11-20T08:01:10Z",
  "expires_at": "2026-11-27T08:01:10Z"
}
```

## 价格

| 档位 | 官方价 / 秒 | Kerox / 秒 | 比官方价低 |
| --- | --- | --- | --- |
| 4K | $0.5490 | $0.4941 | 10% |
| 720p | $0.1570 | $0.1413 | 10% |
| 1080p | $0.2350 | $0.2115 | 10% |

- **带参考视频**时按输出秒数 + max(输出秒数，参考视频总秒数) 计费，单价为 `4K` $0.2961/秒（官方价 $0.3290），`720p` $0.0846/秒（官方价 $0.0940），`1080p` $0.1269/秒（官方价 $0.1410）。

### 提交前估价

返回的 `amount` 是提交时会冻结的金额。估价不创建任务，也不扣费。`exact` 为 `false` 时，最终扣费可能与冻结额不同。

### 不带参考视频

```bash
curl --fail-with-body -X POST https://api.kerox.ai/v1/estimate \
  -H "Authorization: Bearer $KEROX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "kuaishou/kling-4.0",
  "input": {
    "prompt": "a red fox running through fresh snow, cinematic lighting",
    "resolution": "720p",
    "duration": 5,
    "aspect_ratio": "16:9"
  }
}'
```

### 带参考视频

```bash
curl --fail-with-body -X POST https://api.kerox.ai/v1/estimate \
  -H "Authorization: Bearer $KEROX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "kuaishou/kling-4.0",
  "input": {
    "prompt": "a red fox running through fresh snow, cinematic lighting",
    "resolution": "720p",
    "duration": 5,
    "aspect_ratio": "16:9",
    "videos": [
      "https://cdn.kerox.ai/assets/samples/seedance-2.0/sea-stacks-fog.mp4"
    ]
  }
}'
```

## 常见用法参考价

| 片段 | 官方价 | Kerox | 比官方价低 |
| --- | --- | --- | --- |
| 5 秒 · 4K | $2.7450 | $2.4705 | 10% |
| 10 秒 · 4K | $5.4900 | $4.9410 | 10% |
| 15 秒 · 4K | $8.2350 | $7.4115 | 10% |
| 5 秒 · 720p | $0.7850 | $0.7065 | 10% |
| 10 秒 · 720p | $1.5700 | $1.4130 | 10% |
| 15 秒 · 720p | $2.3550 | $2.1195 | 10% |
| 5 秒 · 1080p | $1.1750 | $1.0575 | 10% |
| 10 秒 · 1080p | $2.3500 | $2.1150 | 10% |
| 15 秒 · 1080p | $3.5250 | $3.1725 | 10% |

- **$10 能做多少**：70 秒 720p 视频

## Kling 4.0 是什么

Kling 4.0 是快手可灵系列最新一代的视频生成模型。按官方的介绍，它把视频生成推向专业级制作：动态稳定，画面和声音相互配合。下面几点都来自可灵官网。

### 快手官方怎么介绍 Kling 4.0

- **面向专业制作。** 官方称 Kling 4.0 把视频生成带到了专业级制作的水平。
- **动态稳定。** 官方强调它在大幅度运动的场景里依然稳定，音画结合的效果更真实。
- **运镜控制更多。** 官方列出的镜头类型包括高速动作、连续运动、跟拍、环绕和特写。
- **人物表演更细。** 官方称它能呈现细微的面部表情和肢体语言。
- **最多 10 张图作为输入。** 按可灵官方的制作案例，一次生成最多可以用 10 张图片来引导。

在 Kerox 上，Kling 4.0 开放 720p、1080p 和 4K，时长 3 到 30 秒，画面比例有 16:9、9:16、1:1 和 21:9。一次请求可以带首尾帧，或者最多 10 张参考图、5 段参考视频和 3 段参考音频。编辑和续写已有视频暂未开放。

## 怎么用 Kling 4.0

1. **充值余额** — $5 起充。没有订阅和月费，余额不过期。
2. **设置参数** — 写好提示词，选好分辨率、时长和画面比例，按需添加首尾帧或参考素材。开始前就能看到本次生成的预估费用。
3. **生成并下载** — 提交时按预估价冻结金额，完成后按实际结算。生成失败全额退回。

习惯写代码调用？通过 Kerox API 传入模型 ID `kuaishou/kling-4.0` 即可使用同一模型，详见[Kling 4.0 API 文档](https://kerox.ai/zh/docs/models/kuaishou/kling-4.0.md)。

## Kling 4.0 能做什么

- **文生视频。** 只写提示词，就能生成 3 到 30 秒的视频。
- **用参考图引导。** 传入最多 10 张主体、产品或场景的图片，再描述镜头。
- **图生视频。** 提供首帧，或同时指定首帧和尾帧。
- **4K 长镜头。** 单次最长 30 秒、最高 4K，够拍完一整场戏。
- **跟随参考视频。** 加一段参考视频来带动作，需要时还可以保留它的原声。

## Kling 4.0 和其他模型怎么选

下面这些模型共用同一个余额和同一套 API，切换模型时修改模型 ID，并把参数保持在对方支持的范围内。起价见表格。

| 模型 | 什么时候选它 | 起价 |
| --- | --- | --- |
| [Kling 4.0](https://kerox.ai/zh/models/kuaishou/kling-4.0) | 3 到 30 秒，720p、1080p 或 4K。做长片段，或者需要 1080p、4K 时选它。 | 4K: $0.4941, 720p: $0.1413, 1080p: $0.2115 |
| [Kling 4.0 Flash](https://kerox.ai/zh/models/kuaishou/kling-4.0-flash) | Kling 4.0 的 Flash 型号：3 到 20 秒，720p，支持参考图和参考视频，不支持参考音频。适合打草稿和批量生成。 | 720p: $0.0846 |
| [Seedance 2.5](https://kerox.ai/zh/models/bytedance/seedance-2.5) | 字节的视频模型，4 到 30 秒，最高 1080p，最多 30 张参考图。参考素材多，或想自己开关生成的声音时选它。 | 约 $0.0977 / 秒起（480p） |
| [Magi-2](https://kerox.ai/zh/models/sand-ai/magi-2) | Sand AI 的视频模型，最长 30 秒，1080p，带声音。做带对白或声音的 1080p 长片段时选它。 | 1080p: $0.1000 |
| [Seedance 2.0](https://kerox.ai/zh/models/bytedance/seedance-2.0) | 字节的视频模型，4 到 15 秒，可输出 4K。适合较短的 4K 片段。 | 约 $0.0668 / 秒起（480p） |
| [MiniMax H3](https://kerox.ai/zh/models/minimax/h3) | MiniMax 的视频模型，4 到 15 秒，768p 或 2K。想用同一提示词对比另一家的模型时选它。 | 2K: $0.0650, 768p: $0.0400 |
| [Wan 3.0](https://kerox.ai/zh/models/alibaba/wan-3.0) | 阿里的视频模型，2 到 30 秒，最高 1080p。片段短于 3 秒时选它。 | 480p: $0.0400, 720p: $0.0800, 1080p: $0.1600 |

## Kling 4.0 常见问题

### Kling 4.0 免费吗？

在 Kerox 上不是。目前没有免费版和免费试用，$5 起充，用多少付多少。

### Kling 4.0 最长能生成几秒？

单次 3 到 30 秒，按整秒设置，默认 5 秒。Kling 4.0 Flash 最长 20 秒。

### Kling 4.0 支持 4K 吗？

支持。在 Kerox 上，Kling 4.0 可以生成 720p、1080p 和 4K。模型按输出秒数计费，每秒的费率由分辨率决定，所以同样的片段 4K 比 720p 贵。上方价格表列出了各分辨率下常见片段的价格。

### Kling 4.0 和 Kling 4.0 Flash 有什么区别？

区别在时长、分辨率和输入。Kling 4.0 支持 3 到 30 秒，720p、1080p 或 4K，参考图、参考视频和参考音频都能带。Kling 4.0 Flash 支持 3 到 20 秒，只有 720p，能带参考图和参考视频，不能带参考音频。两个模型各有自己的费率，当前起价见上方对比表。

### Kling 4.0 能用参考图、参考视频和参考音频吗？

能。一次请求最多 10 张参考图；最多 5 段参考视频，合计不超过 30 秒；最多 3 段参考音频，每段 5 到 30 秒。同一次请求里，首帧、尾帧不能和参考素材一起用。带参考视频时，把 `keep_original_sound` 设为 true 就会使用它的原声。

### 带参考视频时，Kling 4.0 的价格怎么算？

费率和计费秒数都会变。带参考视频时每秒的费率更低，但计费秒数是输出秒数，再加上输出秒数和参考视频秒数里较长的那个。开始前，Studio 和估价接口都会给出这次请求的总价，两种费率见上方价格表。


## 输入 schema（JSON）

### 参数（`unified.input_schema`）

```json
{
  "type": "object",
  "allOf": [
    {
      "if": {
        "required": [
          "first_frame"
        ],
        "properties": {
          "first_frame": true
        }
      },
      "then": {
        "not": {
          "anyOf": [
            {
              "required": [
                "images"
              ],
              "properties": {
                "images": true
              }
            },
            {
              "required": [
                "videos"
              ],
              "properties": {
                "videos": true
              }
            },
            {
              "required": [
                "audios"
              ],
              "properties": {
                "audios": true
              }
            }
          ]
        }
      }
    },
    {
      "if": {
        "required": [
          "aspect_ratio"
        ],
        "properties": {
          "aspect_ratio": {
            "const": "auto"
          }
        }
      },
      "then": {
        "anyOf": [
          {
            "required": [
              "images"
            ],
            "properties": {
              "images": true
            }
          },
          {
            "required": [
              "videos"
            ],
            "properties": {
              "videos": true
            }
          },
          {
            "required": [
              "audios"
            ],
            "properties": {
              "audios": true
            }
          }
        ]
      }
    }
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "required": [
    "prompt"
  ],
  "properties": {
    "prompt": {
      "type": "string",
      "pattern": "\\S",
      "minLength": 1,
      "description": "Text describing what to generate.",
      "x-label-en": "Prompt",
      "x-label-zh": "提示词",
      "x-tier": "common"
    },
    "keep_original_sound": {
      "type": "boolean",
      "description": "Use the sound from the reference video. Requires videos.",
      "x-label-en": "Keep original sound",
      "x-label-zh": "保留参考视频原声",
      "x-tier": "advanced"
    },
    "images": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^https://"
        },
        {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^https://"
          },
          "maxItems": 10,
          "minItems": 1
        }
      ],
      "description": "Images for the model to draw on, in the order the prompt refers to them.",
      "x-label-en": "Reference images",
      "x-label-zh": "参考图",
      "x-tier": "common"
    },
    "videos": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^https://"
        },
        {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^https://"
          },
          "maxItems": 5,
          "minItems": 1
        }
      ],
      "description": "Videos for the model to draw on, in the order the prompt refers to them.",
      "x-label-en": "Reference videos",
      "x-label-zh": "参考视频",
      "x-tier": "advanced"
    },
    "audios": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^https://"
        },
        {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^https://"
          },
          "maxItems": 3,
          "minItems": 1
        }
      ],
      "description": "Audio clips for the model to draw on, in the order the prompt refers to them.",
      "x-label-en": "Reference audio",
      "x-label-zh": "参考音频",
      "x-tier": "advanced"
    },
    "first_frame": {
      "type": "string",
      "pattern": "^https://",
      "description": "The image a video starts from.",
      "x-label-en": "First frame",
      "x-label-zh": "首帧",
      "x-tier": "common"
    },
    "last_frame": {
      "type": "string",
      "pattern": "^https://",
      "description": "The image a video ends on. Needs `first_frame`.",
      "x-label-en": "Last frame",
      "x-label-zh": "尾帧",
      "x-tier": "advanced"
    },
    "aspect_ratio": {
      "enum": [
        "16:9",
        "9:16",
        "1:1",
        "21:9",
        "auto"
      ],
      "type": "string",
      "description": "Width to height of the output.",
      "x-label-en": "Aspect ratio",
      "x-label-zh": "画面比例",
      "x-tier": "common"
    },
    "resolution": {
      "enum": [
        "720p",
        "1080p",
        "4K"
      ],
      "type": "string",
      "default": "720p",
      "description": "Output resolution tier. The exact pixels follow from it and `aspect_ratio`.",
      "x-label-en": "Resolution",
      "x-label-zh": "分辨率",
      "x-tier": "common"
    },
    "duration": {
      "type": "integer",
      "default": 5,
      "maximum": 30,
      "minimum": 3,
      "description": "Length of the output in whole seconds.",
      "x-label-en": "Duration",
      "x-label-zh": "时长",
      "x-tier": "common"
    },
    "n": {
      "type": "integer",
      "const": 1,
      "default": 1,
      "description": "How many outputs one task may produce.",
      "x-label-en": "Number of outputs",
      "x-label-zh": "生成数量",
      "x-tier": "advanced"
    }
  },
  "x-unsupported": [
    "watermark"
  ],
  "dependentRequired": {
    "last_frame": [
      "first_frame"
    ],
    "keep_original_sound": [
      "videos"
    ]
  },
  "additionalProperties": false
}
```
