omni 视频生成
POST /v1/video/create
概览
| Method | POST |
|---|---|
| Path | /v1/video/create |
| Type | http |
| Status | -2 |
| Module | 2102810 |
| Folder | 86612373 |
参数
{ "header": [ { "required": false, "description": "请求体数据格式", "type": "string", "id": "PUae1mmYl8", "enable": true, "name": "Content-Type", "sampleValue": "application/json" }, { "required": false, "description": "客户端期望接收的响应数据格式", "type": "string", "id": "kChSkrsM0u", "enable": true, "name": "Accept", "sampleValue": "application/json" }, { "required": false, "description": "API 认证密钥,格式为 Bearer + 空格 + 你的 API Key", "type": "string", "id": "o3jI1igSGn", "enable": true, "name": "Authorization", "sampleValue": "Bearer {{YOUR_API_KEY}}" } ] }
请求体
{ "type": "application/json", "parameters": [], "jsonSchema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://example.com/schemas/video-create-omni-veo.schema.json", "title": "Video Create Request Schema", "type": "object", "additionalProperties": false, "required": [ "model", "prompt" ], "properties": { "model": { "type": "string", "description": "模型名称(示例:omni-flash、omni-flash-edit)", "minLength": 1 }, "prompt": { "type": "string", "description": "视频内容描述", "minLength": 1 }, "type": { "type": "integer", "description": "生成类型:1=文生视频, 2=首尾帧, 3=垫图参考, 4=Omni-Flash 视频编辑", "enum": [ 1, 2, 3, 4 ] }, "aspect_ratio": { "type": "string", "description": "画幅比例", "enum": [ "16:9", "9:16" ] }, "images": { "type": "array", "description": "图片 URL 数组(type=2 需 1-2 张,type=3 需 1-3 张)", "items": { "type": "string", "format": "uri", "minLength": 1 }, "minItems": 1, "maxItems": 3, "uniqueItems": true }, "enable_upsample": { "type": "boolean", "description": "升级到 1080p(部分 4K 模型有效)", "default": false }, "enable_sample": { "type": "boolean", "description": "Omni-Flash 系列切换 1080p(4K 模型忽略)" }, "input_reference": { "type": "string", "description": "Omni-Flash edit 参考视频(JSON 场景传 URL 或 dataURI)", "minLength": 1 }, "seconds": { "type": "string", "description": "视频时长(秒),示例:\"8\"", "pattern": "^[1-9][0-9]*$" }, "size": { "type": "string", "description": "自定义尺寸,宽比高长为16:9,高比宽长为9:16,aspect_ratio生效时,该参数无效", "pattern": "^[1-9][0-9]{1,4}x[1-9][0-9]{1,4}$" } }, "allOf": [ { "if": { "properties": { "type": { "const": 2 } }, "required": [ "type" ], "x-apifox-orders": [ "type" ] }, "then": { "required": [ "images" ], "properties": { "images": { "minItems": 1, "maxItems": 2 } }, "x-apifox-orders": [ "images" ] } }, { "if": { "properties": { "type": { "const": 3 } }, "required": [ "type" ], "x-apifox-orders": [ "type" ] }, "then": { "required": [ "images" ], "properties": { "images": { "minItems": 1, "maxItems": 3 } }, "x-apifox-orders": [ "images" ] } }, { "if": { "properties": { "type": { "const": 4 } }, "required": [ "type" ], "x-apifox-orders": [ "type" ] }, "then": { "required": [ "input_reference" ] } }, { "if": { "properties": { "model": { "pattern": "^veo" } }, "required": [ "model" ], "x-apifox-orders": [ "model" ] }, "then": { "properties": { "watermark": { "enum": [ "true", "false" ] } }, "x-apifox-orders": [ "watermark" ] } } ], "examples": [ { "model": "omni-flash", "prompt": "海边日落航拍", "type": 1, "aspect_ratio": "16:9", "seconds": "8" }, { "model": "omni-flash-edit", "prompt": "增强细节并稳定镜头", "type": 4, "input_reference": "https://example.com/input.mp4", "seconds": "8" } ], "x-apifox-orders": [ "model", "prompt", "type", "aspect_ratio", "images", "enable_upsample", "enable_sample", "input_reference", "seconds", "size" ] }, "required": true, "mediaType": "", "examples": [ { "mediaType": "application/json", "value": "{\r\n \"model\": \"omni-flash\",\r\n \"prompt\": \"hello world\"\r\n}", "name": "新手推荐: 新手最小 · 文生基础 · model+prompt" }, { "name": "新手推荐:横屏标准 · 文生视频 · model+prompt+aspect_ratio+seconds", "value": "{\r\n \"model\": \"omni-flash\",\r\n \"prompt\": \"海边日落航拍\",\r\n \"aspect_ratio\": \"16:9\",\r\n \"seconds\": \"8\"\r\n}", "mediaType": "application/json" }, { "name": "新手推荐:竖屏标准 · 文生视频 · model+prompt+aspect_ratio+seconds", "value": "{\r\n \"model\": \"omni-flash\",\r\n \"prompt\": \"街头人物慢动作\",\r\n \"aspect_ratio\": \"9:16\",\r\n \"seconds\": \"8\"\r\n}", "mediaType": "application/json" }, { "name": "新手推荐:双图过渡 · 首尾帧生成 · model+prompt+images+seconds", "value": "{\r\n \"model\": \"omni-flash\",\r\n \"prompt\": \"首尾帧平滑过渡\",\r\n \"images\": [\r\n \"https://ts1.tc.mm.bing.net/th/id/R-C.8dbf8e136e7d71653b63fdbd4d17fb6c?rik=KEcgD1%2fwKEKc9A&riu=http%3a%2f%2fimg.xintp.com%2f2019%2f12%2f10%2fxl5gp5kgesw.jpg&ehk=j5IVfJ0NDf2S9Ki9dJ7uXRMGlqubf9rR8TGsNLZP%2fMQ%3d&risl=&pid=ImgRaw&r=0\",\r\n \"https://ts1.tc.mm.bing.net/th/id/R-C.ef98ae99612a621c19aaf5c02df8590a?rik=bpRpplfXRRo8pA&riu=http%3a%2f%2fimg95.699pic.com%2fphoto%2f50166%2f6903.jpg_wh300.jpg&ehk=yf0pMNdv%2bxIdqiWephK%2fg%2bt9K%2fTLDd8Db46yw8Q%2bSXM%3d&risl=&pid=ImgRaw&r=0\"\r\n ],\r\n \"seconds\": \"8\"\r\n}", "mediaType": "application/json" }, { "name": "新手推荐:单图参考 · 垫图参考生成 · model+prompt+images+seconds", "value": "{\r\n \"model\": \"omni-flash\",\r\n \"prompt\": \"保持主体风格生成视频\",\r\n \"images\": [\r\n \"https://static.jokers.pub/upload/ai/728c4393-77ee-441a-99fa-ea1c294035a1/Image-91o3qgbn15t9o2k/1779515038884-1742.jpg\"\r\n ],\r\n \"seconds\": \"8\"\r\n}", "mediaType": "application/json" }, { "name": "新手推荐:URL编辑基础 · 视频编辑 · model+prompt+input_reference+seconds", "value": "{\r\n \"model\": \"omni-flash-edit\",\r\n \"prompt\": \"将原视频改为电影感\",\r\n \"video\": \"https://example.com/input.mp4\",\r\n \"type\":4\r\n}", "mediaType": "application/json" }, { "name": "进阶推荐:三图融合 · 垫图参考生成 · model+prompt+images+aspect_ratio+seconds", "value": "{\r\n \"model\": \"omni-flash\",\r\n \"prompt\": \"融合三张参考图的主体与配色风格\",\r\n \"images\": [\r\n \"https://ts2.tc.mm.bing.net/th/id/OIP-C.iBy7zllJXvjrzOH-VdwH_gHaEK?rs=1&pid=ImgDetMain&o=7&rm=3\",\r\n \"https://imgs.699pic.com/images/600/406/117.jpg!list1x.v2\",\r\n \"https://ts2.tc.mm.bing.net/th/id/OIP-C.thJJkD55hZLuc-D86OW7bgHaEW?rs=1&pid=ImgDetMain&o=7&rm=3\"\r\n ],\r\n \"aspect_ratio\": \"9:16\",\r\n \"seconds\": \"8\"\r\n}", "mediaType": "application/json" }, { "name": "进阶推荐:DataURI编辑 · 视频编辑 · model+prompt+input_reference(dataURI)+seconds", "value": "{\r\n \"model\": \"omni-flash-edit\",\r\n \"prompt\": \"提升色彩与光影\",\r\n \"video\": \"https://cdn.dealonhorizon.us/video/d2fa3281de7a69f3ac07b3451cf922e3ba609daad00d081674b283a63de67e54.mp4\",\r\n \"type\": 4,\r\n}", "mediaType": "application/json" }, { "name": "进阶推荐:显式type文生 · 文生兼容调用 · model+prompt+type+seconds", "value": "{\r\n \"model\": \"omni-flash\",\r\n \"prompt\": \"城市天际线延时\",\r\n \"type\": 1,\r\n \"seconds\": \"8\"\r\n}", "mediaType": "application/json" } ], "oasExtensions": "" }
响应
[ { "id": 112521740, "name": "成功", "code": 200, "contentType": "json", "jsonSchema": { "type": "object", "properties": { "id": { "type": "string" }, "status": { "type": "string" }, "status_update_time": { "type": "integer" } }, "required": [ "id", "status", "status_update_time" ], "x-apifox-orders": [ "id", "status", "status_update_time" ] }, "itemSchema": {}, "description": "", "mediaType": "", "headers": [] } ]
响应示例
[ { "name": "文生最小返回", "responseId": 112521740, "data": "{\r\n \"id\": \"omni-flash_X:task_uAbDkbRmcOafvSBBmNWwQkIA1gvTdoaX\",\r\n \"status\": \"queued\",\r\n \"status_update_time\": 1779950697931\r\n}", "id": "019e6d7a-c6f8-7666-89f0-49572c8ac3f6" } ]