# 创建视频生成任务 This file is the focused AI-readable context for one UniAll documentation page. URL: https://docs.uniall.ai/zh-CN/models/video/veo-3-1/create-task Locale: zh-CN Markdown: https://docs.uniall.ai/ai/pages/zh-CN/models/video/veo-3-1/create-task.md Description: Veo 3.1 创建视频生成任务接口。 Agent guidance: - Use this page when the user is asking about this specific route or model capability. - Preserve endpoint paths, JSON keys, model IDs, and placeholder values exactly. - Treat examples such as `sk-***`, `{BASE_URL}`, and `task_xxx` as safe placeholders, not real secrets. ## Page Markdown ## 说明 | 公共模型名 | 当前支持的视频生成能力 | |---|---| | `veo3.1-video-720p` | 文生视频、单图生视频、首尾帧、多图参考生视频、视频续写 | | `veo3.1-video-1080p` | 文生视频、单图生视频、首尾帧、多图参考生视频、视频续写 | | `veo3.1-video-4k` | 文生视频、单图生视频、首尾帧、多图参考生视频、视频续写 | | `veo3.1-fast-video-720p` | 文生视频、单图生视频、首尾帧、视频续写 | | `veo3.1-fast-video-1080p` | 文生视频、单图生视频、首尾帧、视频续写 | | `veo3.1-fast-video-4k` | 文生视频、单图生视频、首尾帧、视频续写 | ## Endpoint ```http POST /v1/video/generations ``` ## Query 参数 | Name | Type | Required | Description | Example | | --- | --- | --- | --- | --- | | `Authorization` | string | No | | Bearer {your_token} | ## 请求体参数 | Field | Type | Required | Title | Description | | --- | --- | --- | --- | --- | | `model` | string | Yes | 公共模型名 | | | `prompt` | string | Yes | 主提示词 | 结构上不是绝对必填,但实际强烈建议传 | | `image` | string | Yes | 单张源图 URL | 图生视频 | | `images` | string | Yes | 多张参考图 URL 列表 | 2 到 3 张图会触发多图参考生视频 | | `last_image` | string | Yes | 目标尾帧图 URL | 首尾帧,与image配合使用 | | `video` | string | Yes | 源视频 UR | 触发视频续写 | | `size` | string | Yes | 分辨率提示 | 必须与所选公共模型档位保持一致 | | `aspect_ratio` | string | Yes | 输出比例 | 文生视频允许值:`16:9`、`9:16`;图生视频,视频续写不使用,可传输出不保证效果 | | `duration` | string | Yes | 输出时长,单位秒 | 允许值:`4`、`6`、`8`;视频续写不使用 | | `extra_body` | object | Yes | 扩展字段 | | ## 请求示例 ### 文生视频 ```json { "model": "veo3.1-video-1080p", "prompt": "黄金时刻的街头采访镜头,镜头轻微手持晃动,人物真实发声,环境中有自然城市背景音。", "size": "1080p", "aspect_ratio": "16:9", "duration": 8, "extra_body": { "generate_audio": true, "negative_prompt": "水印, 模糊", "seed": 7 } } ``` ```bash curl -X POST "{BASE_URL}/v1/video/generations" \ -H "Authorization: Bearer sk-***" \ -H "Content-Type: application/json" \ -d '{ "model": "veo3.1-video-1080p", "prompt": "黄金时刻的街头采访镜头,镜头轻微手持晃动,人物真实发声,环境中有自然城市背景音。", "size": "1080p", "aspect_ratio": "16:9", "duration": 8, "extra_body": { "generate_audio": true, "negative_prompt": "水印, 模糊", "seed": 7 } }' ``` ### 单图生视频 ```json { "model": "veo3.1-video-720p", "prompt": "商品在干净的摄影棚桌面上缓慢旋转,伴随柔和反射光。", "image": "https://example.com/keyframe.png", "size": "720p", "aspect_ratio": "16:9", "duration": 6, "extra_body": { "generate_audio": false, "negative_prompt": "伪影, 抖动" } } ``` ```bash curl -X POST "{BASE_URL}/v1/video/generations" \ -H "Authorization: Bearer sk-***" \ -H "Content-Type: application/json" \ -d '{ "model": "veo3.1-video-720p", "prompt": "商品在干净的摄影棚桌面上缓慢旋转,伴随柔和反射光。", "image": "https://example.com/keyframe.png", "size": "720p", "aspect_ratio": "16:9", "duration": 6, "extra_body": { "generate_audio": false, "negative_prompt": "伪影, 抖动" } }' ``` ### 首尾帧 ```json { "model": "veo3.1-fast-video-1080p", "prompt": "让画面从首帧自然过渡到尾帧,保持主体身份一致、镜头语言连贯。", "image": "https://example.com/start-frame.png", "last_image": "https://example.com/end-frame.png", "size": "1080p", "aspect_ratio": "16:9", "duration": 6, "extra_body": { "generate_audio": true } } ``` ```bash curl -X POST "{BASE_URL}/v1/video/generations" \ -H "Authorization: Bearer sk-***" \ -H "Content-Type: application/json" \ -d '{ "model": "veo3.1-fast-video-1080p", "prompt": "让画面从首帧自然过渡到尾帧,保持主体身份一致、镜头语言连贯。", "image": "https://example.com/start-frame.png", "last_image": "https://example.com/end-frame.png", "size": "1080p", "aspect_ratio": "16:9", "duration": 6, "extra_body": { "generate_audio": true } }' ``` ### 多图参考一致性生视频 ```json { "model": "veo3.1-video-1080p", "prompt": "保持同一角色的脸、服装和身份一致,在雨夜小巷中向前行走。", "images": [ "https://example.com/ref-1.png", "https://example.com/ref-2.png" ], "size": "1080p", "aspect_ratio": "9:16", "duration": 6, "extra_body": { "generate_audio": true, "seed": 11 } } ``` ```bash curl -X POST "{BASE_URL}/v1/video/generations" \ -H "Authorization: Bearer sk-***" \ -H "Content-Type: application/json" \ -d '{ "model": "veo3.1-video-1080p", "prompt": "保持同一角色的脸、服装和身份一致,在雨夜小巷中向前行走。", "images": [ "https://example.com/ref-1.png", "https://example.com/ref-2.png" ], "size": "1080p", "aspect_ratio": "9:16", "duration": 6, "extra_body": { "generate_audio": true, "seed": 11 } }' ``` ### 视频续写 ```json { "model": "veo3.1-video-720p", "prompt": "自然续接原视频中的动作,并保持同样的场景风格。", "video": "https://example.com/source.mp4", "size": "720p", "duration": 6, "extra_body": { "negative_prompt": "闪烁, 故障感", "seed": 9 } } ``` ```bash curl -X POST "{BASE_URL}/v1/video/generations" \ -H "Authorization: Bearer sk-***" \ -H "Content-Type: application/json" \ -d '{ "model": "veo3.1-video-720p", "prompt": "自然续接原视频中的动作,并保持同样的场景风格。", "video": "https://example.com/source.mp4", "size": "720p", "duration": 6, "extra_body": { "negative_prompt": "闪烁, 故障感", "seed": 9 } }' ``` ## 响应字段 | Field | Type | Required | Title | Description | | --- | --- | --- | --- | --- | ## 响应示例 ### 示例 1 ```json {} ```