跳转到主要内容
POST
/
v1
/
videos
/
generations
Kling O3 Video-to-Video Edit
curl --request POST \
  --url https://api.foxapi.cc/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "kling-o3-video-to-video-edit",
  "prompt": "基于 @Video1,将整体场景改成黄昏金色调,并把天空替换成层次丰富的晚霞云层",
  "resolution": "720p",
  "video_url": "https://samplelib.com/lib/preview/mp4/sample-5s.mp4",
  "keep_audio": false,
  "elements": [
    {
      "frontal_image_url": "https://picsum.photos/id/237/768/1024.jpg",
      "reference_image_urls": [
        "https://picsum.photos/id/1062/768/1024.jpg"
      ]
    }
  ]
}
'
{
  "created": 1757165031,
  "id": "task-unified-1757165031-uyujaw3d",
  "model": "<string>",
  "object": "video.generation.task",
  "progress": 0,
  "status": "pending",
  "task_info": {
    "can_cancel": true,
    "estimated_time": 45
  },
  "type": "video"
}

Documentation Index

Fetch the complete documentation index at: https://docs.foxapi.cc/llms.txt

Use this file to discover all available pages before exploring further.

授权

Authorization
string
header
必填

所有接口均需要使用Bearer Token进行认证

使用时在请求头中添加:

Authorization: Bearer YOUR_API_KEY

请求体

application/json
model
string
默认值:kling-o3-video-to-video-edit
必填

kling-o3-video-to-video-edit:基于参考视频进行内容编辑

示例:

"kling-o3-video-to-video-edit"

prompt
string
必填

文本提示词

说明:

  • 最长 2500 字符
  • 可使用 @Video1 / @Image1 / @Element1 引用素材
Maximum string length: 2500
示例:

"基于 @Video1,将整体场景改成黄昏金色调"

video_url
string
必填

参考视频 URL

说明:

  • 支持 .mp4 / .mov
  • 时长 3 - 10
  • 宽高 720 - 2160 px
  • 最大 200MB
  • 在提示词中用 @Video1 引用
示例:

"https://samplelib.com/lib/preview/mp4/sample-5s.mp4"

resolution
string
默认值:720p

输出分辨率

可选值:

  • 720p — 720P 标清
  • 1080p — 1080P 高清
示例:

"720p"

keep_audio
boolean
默认值:true

是否保留参考视频原始音频

非必须不要传这个参数。

示例:

true

image_urls
string[] | null

参考图片 URL 列表

说明:

  • 在提示词中使用 @Image1 / @Image2 引用
  • image_urlselements 总数最多 4
示例:
[
"https://picsum.photos/id/1043/1280/720.jpg"
]
elements
object[] | null

主体元素列表(仅支持图片主体)

说明:

  • 在提示词中使用 @Element1 / @Element2 引用
  • image_urlselements 总数最多 4

非必须不要传这个参数。

示例:
[
{
"frontal_image_url": "https://picsum.photos/id/237/768/1024.jpg",
"reference_image_urls": [
"https://picsum.photos/id/1062/768/1024.jpg"
]
}
]

响应

任务创建成功

created
integer

任务创建时间戳

示例:

1757165031

id
string

任务ID

示例:

"task-unified-1757165031-uyujaw3d"

model
string

实际使用的模型名称

object
enum<string>

任务的具体类型

可用选项:
video.generation.task
progress
integer

任务进度百分比 (0-100)

必填范围: 0 <= x <= 100
示例:

0

status
enum<string>

任务状态

可用选项:
pending,
processing,
completed,
failed
示例:

"pending"

task_info
object

异步任务信息

type
enum<string>

任务的输出类型

可用选项:
video
示例:

"video"