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

# Kling 3.0 Omni 视频编辑

> Kling 3.0 Omni Edit 是 APIPod 面向 Kling 3.0 Omni 提供的视频编辑模式，根据文本指令改写源视频，可附加最多 4 张参考图。

## 使用说明

* **源视频**：`video_urls` 中必须且只能传 1 个 MP4/MOV 视频（3-15.5 秒），可附加最多 4 张参考图。输出时长与宽高比跟随源视频，因此不接受 `duration` 和 `aspect_ratio`。将 `keep_original_sound` 设为 `true` 可保留原声。
* **引用输入**：图片按顺序编号为 `image_1`..`image_N`，视频为 `video_1`。在 prompt 中用 `@image_1` / `@video_1` 指向具体输入。
* **不支持**：`negative_prompt`（请把排除项写进 prompt）、`audio_urls`、`video_url`（请使用 `video_urls`）。

## 计费

按源视频时长（向上取整到整秒）逐秒计费，720p / 1080p 按增强档计费（4K 按 4K 档）。每秒费率分档：720p 基础、720p 增强、1080p 基础、1080p 增强、4K。开启原生音频或带任何视频输入时按增强档计费。具体价格以 [模型页](https://www.apipod.ai/models) 展示为准。

## 任务流程

创建请求返回 `data.task_id`。使用[查询视频任务](/zh-CN/query-video-task)轮询，直到 `status` 变为 `completed`（结果位于 `data.result`）或 `failed`；也可以传入 `callback_url`，在任务进入终态时接收通知。


## OpenAPI

````yaml api-reference/openapi/kling-3.0--kling-3.0-omni-edit.zh.yaml POST /v1/videos/generations
openapi: 3.1.0
info:
  title: Kling 3.0 Omni Video Edit API
  version: 1.0.0
  description: >-
    Kling 3.0 Omni Edit 是 APIPod 面向 Kling 3.0 Omni 提供的视频编辑模式，根据文本指令改写源视频，可附加最多 4
    张参考图。在 APIPod 中，公开模型 ID 为
    kling-3.0-omni-edit。它接受文本、图片、视频输入，时长与宽高比跟随源视频，并通过异步视频任务返回结果。
servers:
  - url: https://api.apipod.ai
    description: 生产环境
security: []
paths:
  /v1/videos/generations:
    post:
      tags:
        - Kling 3.0 Omni Video Edit
      summary: 创建生成任务
      description: >-
        Kling 3.0 Omni Edit 是 APIPod 面向 Kling 3.0 Omni
        提供的视频编辑模式，根据文本指令改写源视频，可附加最多 4 张参考图。在 APIPod 中，公开模型 ID 为
        kling-3.0-omni-edit。它接受文本、图片、视频输入，时长与宽高比跟随源视频，并通过异步视频任务返回结果。
      operationId: create-kling-3.0-kling-3.0-omni-edit
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              title: Kling 3.0 Omni Video Edit
              properties:
                model:
                  type: string
                  title: Model ID
                  description: APIPod 公开模型 ID。
                  const: kling-3.0-omni-edit
                prompt:
                  type: string
                  title: Prompt
                  description: >-
                    必填的编辑指令，最多 2500 字。输入会自动编号：图片按顺序为 `image_1`..`image_N`，视频为
                    `video_1`；可在 prompt 中以 `@image_1`、`@video_1` 引用。
                  maxLength: 2500
                video_urls:
                  type: array
                  title: Source Video
                  description: 仅 1 个待编辑的源视频 URL（MP4 或 MOV，3-15.5 秒）。输出时长与宽高比跟随该视频。
                  minItems: 1
                  maxItems: 1
                  items:
                    type: string
                image_urls:
                  type: array
                  title: Reference Images
                  description: 可选的参考图 URL（最多 4 张）。
                  maxItems: 4
                  items:
                    type: string
                resolution:
                  type: string
                  title: Resolution
                  description: 输出分辨率，默认 720p。每秒费率取决于分辨率档位。
                  enum:
                    - 720p
                    - 1080p
                    - 4k
                  default: 720p
                keep_original_sound:
                  type: boolean
                  title: Keep Original Sound
                  description: 是否保留源视频的音轨。默认 false（输出不保留原声）。
                  default: false
                watermark:
                  type: boolean
                  title: Watermark
                  description: 为 true 时额外生成带水印的副本，任务结果返回水印副本。
                  default: false
                callback_url:
                  type: string
                  title: Callback URL
                  description: 接收任务终态通知的 HTTPS 地址。
                  default: ''
              required:
                - model
                - prompt
                - video_urls
            examples:
              basic:
                summary: 参考图编辑
                value:
                  model: kling-3.0-omni-edit
                  prompt: >-
                    Replace the cloudy sky in @video_1 with the sunset sky from
                    @image_1, keep everything else unchanged.
                  video_urls:
                    - https://cdn.example.com/source-clip.mp4
                  image_urls:
                    - https://cdn.example.com/kling-ref-1.jpg
                  resolution: 1080p
                  keep_original_sound: true
              text_only:
                summary: 纯文本编辑
                value:
                  model: kling-3.0-omni-edit
                  prompt: Turn @video_1 into a hand-drawn watercolor animation style.
                  video_urls:
                    - https://cdn.example.com/source-clip.mp4
                  resolution: 720p
      responses:
        '200':
          description: 任务已受理
          content:
            application/json:
              schema:
                type: object
                title: Task Submit Response
                description: Standard response for task submission
                properties:
                  code:
                    type: integer
                    description: HTTP 状态码。
                  data:
                    type: object
                    title: Task Submit Data
                    description: 响应数据。
                    properties:
                      task_id:
                        type: string
                        description: 用于查询任务状态的 APIPod 任务 ID。
                  message:
                    type: string
                    description: 响应消息。
                required:
                  - code
                  - message
                  - data
              example:
                code: 200
                message: success
                data:
                  task_id: vid_task_01JEXAMPLE
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl https://api.apipod.ai/v1/videos/generations \
              -H "Authorization: Bearer $APIPOD_API_KEY" \
              -H "Content-Type: application/json" \
              -d '{
              "model": "kling-3.0-omni-edit",
              "prompt": "Replace the cloudy sky in @video_1 with the sunset sky from @image_1, keep everything else unchanged.",
              "video_urls": [
                "https://cdn.example.com/source-clip.mp4"
              ],
              "image_urls": [
                "https://cdn.example.com/kling-ref-1.jpg"
              ],
              "resolution": "1080p",
              "keep_original_sound": true
            }'
        - lang: Python
          label: Python
          source: |-
            import os
            import requests

            payload = {
              "model": "kling-3.0-omni-edit",
              "prompt": "Replace the cloudy sky in @video_1 with the sunset sky from @image_1, keep everything else unchanged.",
              "video_urls": [
                "https://cdn.example.com/source-clip.mp4"
              ],
              "image_urls": [
                "https://cdn.example.com/kling-ref-1.jpg"
              ],
              "resolution": "1080p",
              "keep_original_sound": True
            }

            response = requests.post(
                "https://api.apipod.ai/v1/videos/generations",
                headers={
                    "Authorization": f"Bearer {os.environ['APIPOD_API_KEY']}",
                    "Content-Type": "application/json",
                },
                json=payload,
                timeout=60,
            )
            response.raise_for_status()
            print(response.json())
        - lang: Go
          label: Go
          source: |-
            package main

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

            func main() {
                body := []byte(`{
              "model": "kling-3.0-omni-edit",
              "prompt": "Replace the cloudy sky in @video_1 with the sunset sky from @image_1, keep everything else unchanged.",
              "video_urls": [
                "https://cdn.example.com/source-clip.mp4"
              ],
              "image_urls": [
                "https://cdn.example.com/kling-ref-1.jpg"
              ],
              "resolution": "1080p",
              "keep_original_sound": true
            }`)

                req, err := http.NewRequest(http.MethodPost, "https://api.apipod.ai/v1/videos/generations", bytes.NewReader(body))
                if err != nil {
                    panic(err)
                }
                req.Header.Set("Authorization", "Bearer "+os.Getenv("APIPOD_API_KEY"))
                req.Header.Set("Content-Type", "application/json")

                resp, err := http.DefaultClient.Do(req)
                if err != nil {
                    panic(err)
                }
                defer resp.Body.Close()
                out, _ := io.ReadAll(resp.Body)
                fmt.Println(resp.Status, string(out))
            }
        - lang: Rust
          label: Rust
          source: |-
            use reqwest::Client;
            use serde_json::json;
            use std::env;

            #[tokio::main]
            async fn main() -> Result<(), Box<dyn std::error::Error>> {
                let payload = json!({
                  "model": "kling-3.0-omni-edit",
                  "prompt": "Replace the cloudy sky in @video_1 with the sunset sky from @image_1, keep everything else unchanged.",
                  "video_urls": [
                    "https://cdn.example.com/source-clip.mp4"
                  ],
                  "image_urls": [
                    "https://cdn.example.com/kling-ref-1.jpg"
                  ],
                  "resolution": "1080p",
                  "keep_original_sound": true
                });
                let response = Client::new()
                    .post("https://api.apipod.ai/v1/videos/generations")
                    .bearer_auth(env::var("APIPOD_API_KEY")?)
                    .json(&payload)
                    .send()
                    .await?
                    .error_for_status()?;

                println!("{}", response.text().await?);
                Ok(())
            }
        - lang: JavaScript
          label: JavaScript
          source: >-
            const response = await
            fetch("https://api.apipod.ai/v1/videos/generations", {
              method: "POST",
              headers: {
                Authorization: `Bearer ${process.env.APIPOD_API_KEY}`,
                "Content-Type": "application/json",
              },
              body: JSON.stringify({
                "model": "kling-3.0-omni-edit",
                "prompt": "Replace the cloudy sky in @video_1 with the sunset sky from @image_1, keep everything else unchanged.",
                "video_urls": [
                  "https://cdn.example.com/source-clip.mp4"
                ],
                "image_urls": [
                  "https://cdn.example.com/kling-ref-1.jpg"
                ],
                "resolution": "1080p",
                "keep_original_sound": true
              }),
            });


            if (!response.ok) {
              throw new Error(`APIPod request failed: ${response.status} ${await response.text()}`);
            }


            console.log(await response.json());
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: APIPod API key
      description: 在 Authorization 请求头中以 Bearer Token 形式传入 APIPod API Key。

````

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