Skip to main content
POST
/
v1
/
videos
创建视频任务
curl --request POST \
  --url https://models.kapon.cloud/v1/videos \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "veo-3.1-fast-generate-preview",
  "prompt": "A cinematic lion at sunset",
  "seconds": 6,
  "size": "1280x720",
  "input_reference": [
    "https://example.com/image.jpg"
  ]
}
'
{
  "id": "video_abc123",
  "object": "video",
  "created_at": 1761234567,
  "status": "queued",
  "model": "veo-3.1-fast-generate-preview",
  "prompt": "A cinematic lion at sunset",
  "progress": 0,
  "seconds": 6,
  "size": "1280x720"
}

可用模型

模型说明
veo-3.1-generate-preview标准质量,画质更优
veo-3.1-fast-generate-preview快速出片,速度更快

创建视频任务

文生视频

curl -X POST "$BASE_URL/v1/videos" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "veo-3.1-fast-generate-preview",
    "prompt": "A cinematic shot of a lion walking through golden savanna at sunset, dramatic lighting",
    "seconds": 6,
    "size": "1280x720"
  }'

图生视频

通过参考图生成视频,支持以下方式: JSON 方式(URL):
curl -X POST "$BASE_URL/v1/videos" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "veo-3.1-generate-preview",
    "prompt": "Camera slowly zooms in, cinematic lighting",
    "seconds": 6,
    "size": "1280x720",
    "input_reference": ["https://example.com/image.jpg"]
  }'
Multipart 方式(上传文件):
curl -X POST "$BASE_URL/v1/videos" \
  -H "Authorization: Bearer $TOKEN" \
  -F "model=veo-3.1-generate-preview" \
  -F "prompt=Camera slowly zooms in, cinematic lighting" \
  -F "seconds=6" \
  -F "size=1280x720" \
  -F "[email protected]"

首尾帧视频

提供首帧和尾帧图片,生成过渡视频:
curl -X POST "$BASE_URL/v1/videos" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "veo-3.1-generate-preview",
    "prompt": "Smooth transition between scenes",
    "seconds": 6,
    "size": "1280x720",
    "input_reference": [
      "https://example.com/first_frame.jpg",
      "https://example.com/last_frame.jpg"
    ]
  }'

响应示例

{
  "id": "video_abc123",
  "object": "video",
  "model": "veo-3.1-fast-generate-preview",
  "status": "queued",
  "progress": 0,
  "created_at": 1761234567
}

查询任务状态

curl "$BASE_URL/v1/videos/{video_id}" \
  -H "Authorization: Bearer $TOKEN"

状态说明

状态说明
queued排队中
in_progress生成中
completed已完成
failed失败

完成响应示例

{
  "id": "video_abc123",
  "object": "video",
  "model": "veo-3.1-fast-generate-preview",
  "status": "completed",
  "progress": 100,
  "video_url": "https://...",
  "seconds": 6,
  "size": "1280x720"
}

下载视频

curl -L "$BASE_URL/v1/videos/{video_id}/content" \
  -H "Authorization: Bearer $TOKEN" \
  -o output.mp4

参数说明

参数类型必填说明
modelstring模型名称
promptstring文本提示词
secondsint/string视频时长:4、6、8 秒(默认 6)
sizestring分辨率(见下表)
input_referencearray参考图 URL 数组(1-3 张)

分辨率选项

分辨率画幅说明
1280x72016:9 横屏720p(默认)
720x12809:16 竖屏720p
1920x108016:9 横屏1080p(仅支持 8 秒)
1080x19209:16 竖屏1080p(仅支持 8 秒)

最佳实践

  • 提示词:描述具体场景、镜头运动、光线氛围,效果更佳
  • 1080p 限制:高清分辨率仅支持 8 秒时长
  • 参考图:建议与目标画幅比例一致
  • 轮询间隔:建议 6-10 秒,避免频繁请求
  • 快速版 vs 标准版:快速版适合预览,标准版画质更优

Authorizations

Authorization
string
header
required

API Key

Body

model
enum<string>
required

模型名称

Available options:
veo-3.1-generate-preview,
veo-3.1-fast-generate-preview
Example:

"veo-3.1-fast-generate-preview"

prompt
string
required

文本提示词

Example:

"A cinematic lion at sunset"

seconds

视频时长(秒):4、6、8

Example:

6

size
enum<string>
default:1280x720

分辨率

Available options:
1280x720,
720x1280,
1920x1080,
1080x1920
Example:

"1280x720"

input_reference
string[]

参考图 URL 数组(1-3 张)

Example:
["https://example.com/image.jpg"]

Response

任务创建成功

id
string

任务 ID

Example:

"video_abc123"

object
enum<string>
Available options:
video
Example:

"video"

created_at
integer

创建时间戳

Example:

1761234567

completed_at
integer

完成时间戳

status
enum<string>

任务状态

Available options:
queued,
in_progress,
completed,
failed
Example:

"queued"

model
string

模型名称

Example:

"veo-3.1-fast-generate-preview"

prompt
string

提示词

progress
number

进度(0-100)

Example:

0

seconds
integer

视频时长

Example:

6

size
string

分辨率

Example:

"1280x720"

video_url
string

视频直链(完成后返回)

error
object