> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anyfast.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Kling 3.0 Omni

> Kling 3.0 Omni v2 Omni 生成、编辑和任务查询 API。

Kling 3.0 Omni 使用 v2 Omni Video 接口。模型由路径选择，提示词和参考素材放在 `contents` 中。

> [tab] Omni 生成或编辑
>
> ## 创建任务
>
> `POST /kling/v2/omni-video/kling-3.0-omni`
>
> ```bash cURL theme={null}
> curl --request POST \
>   --url https://www.anyfast.ai/kling/v2/omni-video/kling-3.0-omni \
>   --header 'Authorization: Bearer YOUR_API_KEY' \
>   --header 'Content-Type: application/json' \
>   --data '{
>     "contents": [{"type": "prompt", "text": "一名旅行者穿过雨后的城市街道"}],
>     "settings": {"resolution": "720p", "aspect_ratio": "16:9", "duration": 3}
>   }'
> ```
>
> ## 请求体
>
> **contents** `object[]` *required*
>
> 包含一个 `prompt` 项，可选 `refer_image`、`feature_video`、`first_frame`、`last_frame` 或 `base_video` 项。
>
> **contents\[].type** `string` *required*
>
> 素材角色。为素材设置 ID 后，可在提示词中使用 `@id` 引用。
>
> **contents\[].text** `string`
>
> `prompt` 项的提示词。
>
> **contents\[].url** `string`
>
> 公开图片或视频 URL。
>
> **settings** `object`
>
> 输出分辨率、时长和画面比例。
>
> **settings.resolution** `string`
>
> `720p`、`1080p` 或 `4k`。
>
> ## 创建响应
>
> ```json 200 theme={null}
> {
>   "code": 0,
>   "message": "",
>   "request_id": "REQUEST_ID",
>   "data": {"id": "TASK_ID", "status": "submitted"}
> }
> ```
>
> **data.id** `string`
>
> 系统任务 ID。
>
> **data.status** `string`
>
> 初始任务状态。

> [tab] 查询任务
>
> ## 查询任务
>
> `GET /kling/v2/tasks?task_ids=TASK_ID`
>
> ```bash cURL theme={null}
> curl --request GET \
>   --url 'https://www.anyfast.ai/kling/v2/tasks?task_ids=TASK_ID' \
>   --header 'Authorization: Bearer YOUR_API_KEY'
> ```
>
> **task\_ids** `string` *required*
>
> 系统任务 ID，多个 ID 用逗号分隔。
>
> ```json 200 theme={null}
> {
>   "code": 0,
>   "message": "",
>   "data": [{
>     "id": "TASK_ID",
>     "status": "succeeded",
>     "outputs": [{"type": "video", "url": "https://example.com/video.mp4", "duration": "5.041"}]
>   }]
> }
> ```
>
> **data\[].id** `string`
>
> 系统任务 ID。
>
> **data\[].status** `string`
>
> `submitted`、`processing`、`succeeded` 或 `failed`。
>
> **data\[].create\_time** `integer`
>
> 任务创建时间，Unix 毫秒时间戳。
>
> **data\[].update\_time** `integer`
>
> 任务更新时间，Unix 毫秒时间戳。
>
> **data\[].outputs** `object[]`
>
> 生成结果。
>
> **data\[].outputs\[].type** `string`
>
> 结果类型。
>
> **data\[].outputs\[].url** `string`
>
> 临时生成媒体 URL。
>
> **data\[].outputs\[].duration** `string`
>
> 生成媒体时长，单位为秒。

## 扩展内容参数

**contents\[].type** `string`

使用 `prompt`、`refer_image`、`first_frame`、`middle_frame`、`last_frame`、`feature_video` 或 `base_video`。

**contents\[].id** `string`

内容项的唯一 ID，在提示词中用 `@id` 引用。

**contents\[].url** `string`

公开图片或视频地址，或支持的原始 Base64 图片内容。

**contents\[].keep\_original\_sound** `string`

视频引用使用 `yes` 保留原音频，使用 `no` 丢弃。

**contents\[].refer\_type** `string`

视频引用使用 `base` 编辑源视频，使用 `feature` 参考其内容、动作、风格或镜头特征。

**settings.multi\_shot** `boolean`

未提供 `base_video` 时启用一到六镜头生成。

**settings.multi\_prompt** `object[]`

自定义镜头项，包含 `index`、`prompt`、`duration`；每个镜头至少 1 秒，总时长等于 `settings.duration`。

**settings.sound** `string`

音频设置。提供参考视频时不能生成新的音频。

### 媒体与组合规则

图片支持 JPG、JPEG、PNG，公开地址或支持的原始 Base64，宽高均至少 300 像素，宽高比为 1:2.5 至 2.5:1。最多提交一个源视频。`base_video` 编辑在未设置 `settings.duration` 时沿用源视频时长，且不能使用多镜头或首尾帧控制；`feature_video` 可用于参考内容、动作、风格、镜头移动或镜头续接。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.