跳转到主要内容
POST
/
v1
/
videos
/
generations
Kling V3 Image-to-Video
curl --request POST \
  --url https://api.foxapi.cc/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "kling-v3-image-to-video",
  "prompt": "从薄雾弥漫的清晨平滑过渡到金色日落",
  "resolution": "720p",
  "image_url": "https://example.com/start.jpg",
  "image_tail_url": "https://example.com/end.jpg",
  "duration": 10
}
'
{
  "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-v3-image-to-video
必填

kling-v3-image-to-video:首帧图驱动视频生成,支持 720p/1080p

示例:

"kling-v3-image-to-video"

prompt
string
必填

文本提示词,描述想要生成的视频内容

说明:

  • 最长 2500 字符
  • 支持中英文
Maximum string length: 2500
示例:

"从薄雾弥漫的清晨平滑过渡到金色日落"

image_url
string
必填

首帧图片的公开 URL

说明:

  • 格式:JPG / PNG
  • 必须为公开可访问的 URL
示例:

"https://example.com/start.jpg"

resolution
string
默认值:720p

输出分辨率

可选值:

  • 720p — 720P 标清
  • 1080p — 1080P 高清
  • 4k — 原生 4K 超清(独立档位,计费不受 generate_audio / voice_ids 影响)
示例:

"720p"

generate_audio
boolean
默认值:false

是否生成配套音频

说明:

  • 启用后视频将包含 AI 生成的音效/配乐
  • 默认关闭
示例:

false

negative_prompt
string
默认值:""

负面提示词,描述不希望出现的元素

说明:

  • 用逗号分隔多个关键词
  • 常用:模糊, 低质量, 水印, 文字叠加

非必须不要传这个参数。

示例:

"模糊, 低质量, 水印, 文字叠加"

image_tail_url
string | null

尾帧图片的公开 URL

说明:

  • 格式:JPG / PNG
  • 必须为公开可访问的 URL
  • image_url 配合使用,生成首尾帧过渡视频
示例:

"https://example.com/end.jpg"

duration
integer
默认值:5

输出视频时长(秒)

可选值:

  • 5 — 5 秒短视频(默认)
  • 10 — 10 秒视频
示例:

5

voice_ids
string[] | null

声音 ID 列表,用于 voice control

说明:

  • 最多 2 个声音
  • prompt 中使用 <<<voice_1>>> / <<<voice_2>>> 引用
  • 通过 kling-video-create-voice 端点获取 voice_id
  • 使用时 generate_audio 必须为 true

非必须不要传这个参数。

示例:
["voice_123456"]
multi_prompt
object[] | null

多段提示词序列

说明:

  • 每段包含独立的提示词和时长
  • 各段时长之和应等于总 duration

非必须不要传这个参数。

响应

任务创建成功

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"