Documentation Index
Fetch the complete documentation index at: https://docs.kapon.cloud/llms.txt
Use this file to discover all available pages before exploring further.
创建视频任务
curl -X POST "$BASE_URL/v1beta/models/veo-3.1-generate-preview:predictLongRunning" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"instances": [{
"prompt": "a drone rises from a beach at sunset, cinematic"
}],
"parameters": {
"durationSeconds": 6,
"aspectRatio": "16:9",
"resolution": "720p"
}
}'
响应:
{
"name": "operations/abc123xyz",
"done": false
}
图生视频
{
"instances": [{
"prompt": "night city with neon rain",
"image": {"uri": "https://example.com/ref.jpg"}
}],
"parameters": {
"durationSeconds": 6,
"aspectRatio": "16:9"
}
}
首尾帧
{
"instances": [{
"prompt": "transition effect",
"image": {"uri": "https://example.com/first.jpg"}
}],
"parameters": {
"durationSeconds": 6,
"lastFrame": {"uri": "https://example.com/last.jpg"}
}
}
查询任务
curl "$BASE_URL/v1beta/operations/{operation_id}" \
-H "Authorization: Bearer $TOKEN"
完成后响应:
{
"name": "operations/abc123xyz",
"done": true,
"response": {
"generateVideoResponse": {
"generatedSamples": [{
"video": {"uri": "https://.../video.mp4"}
}]
}
}
}
参数说明
| 参数 | 说明 |
|---|
instances[].prompt | 文本提示词 |
instances[].image.uri | 首帧图片 URL |
parameters.durationSeconds | 时长(秒) |
parameters.aspectRatio | 宽高比:16:9、9:16 |
parameters.resolution | 分辨率:720p、1080p |
parameters.lastFrame.uri | 尾帧图片 URL |