提交视频生成任务
POST /runwayml/v1/image_to_video
说明
概览
| Method | POST |
|---|---|
| Path | /runwayml/v1/image_to_video |
| Type | http |
| Status | 1 |
| Module | 2102810 |
| Folder | 47681033 |
参数
{ "query": [], "path": [], "cookie": [], "header": [ { "id": "NQs7bxnpZf", "name": "Content-Type", "required": true, "description": "", "type": "string", "enable": true, "sampleValue": "application/json" }, { "id": "qb8tEQbCty", "name": "Accept", "required": true, "description": "", "type": "string", "enable": true, "sampleValue": "application/json" }, { "required": true, "description": "", "type": "string", "id": "gBxcCbXhsa", "enable": true, "name": "Authorization", "sampleValue": "Bearer {{YOUR_API_KEY}}" } ] }
请求体
{ "type": "application/json", "parameters": [], "jsonSchema": { "type": "object", "properties": { "promptImage": { "description": "必填,HTTPS URL或数据URI,包含编码图像作为生成视频的第一帧", "type": "string" }, "model": { "type": "string", "description": "必填,指定使用的模型变体,可选值:\"gen4_turbo\"或\"gen3a_turbo\"" }, "ratio": { "type": "string", "description": " 必填,输出视频分辨率,格式为\"宽度:高度\",不同模型支持不同分辨率" }, "seed": { "description": "可选,随机种子值(0-4294967295),相同种子对相同请求产生相似结果", "type": "integer" }, "promptText": { "description": "可选,字符串(≤1000字符),详细描述期望在视频中出现的内容", "type": "string" }, "duration": { "description": "可选,视频时长(秒),可选值:5或10,默认为10", "type": "integer" } }, "required": [ "promptImage", "model", "ratio", "seed", "promptText", "duration" ], "x-apifox-orders": [ "promptImage", "model", "ratio", "seed", "promptText", "duration" ] }, "mediaType": "", "examples": [ { "value": "{\n \"promptImage\": \"https://www.bt.cn/bbs/template/qiao/style/image/btlogo.png\",\n \"model\": \"gen4_turbo\",\n \"promptText\": \"cat dance\",\n \"watermark\": false,\n \"duration\": 5,\n \"ratio\": \"1280:768\"\n}", "mediaType": "application/json", "description": "" } ], "oasExtensions": "" }
响应
[ { "id": 589887449, "name": "成功", "code": 200, "contentType": "json", "jsonSchema": { "type": "object", "properties": { "code": { "type": "integer" }, "message": { "type": "string" }, "request_id": { "type": "string" }, "data": { "type": "object", "properties": { "task_id": { "type": "string" }, "task_status": { "type": "string" }, "created_at": { "type": "integer" }, "updated_at": { "type": "integer" } }, "required": [ "task_id", "task_status", "created_at", "updated_at" ] } }, "required": [ "code", "message", "request_id", "data" ] }, "itemSchema": {}, "description": "", "mediaType": "", "headers": [], "oasExtensions": "" } ]
响应示例
[ { "name": "成功示例", "responseId": 589887449, "data": "{\r\n \"id\": \"4665a07c-7641-4809-a133-10786201bb56\",\r\n \"prompt\": \"\",\r\n \"state\": \"pending\",\r\n \"queue_state\": null,\r\n \"created_at\": \"2024-12-22T13:38:40.139409Z\",\r\n \"batch_id\": \"\",\r\n \"video\": null,\r\n \"video_raw\": null,\r\n \"liked\": null,\r\n \"estimate_wait_seconds\": null,\r\n \"thumbnail\": null,\r\n \"last_frame\": null\r\n}", "description": "", "oasKey": "", "oasExtensions": "", "id": 463793195 } ]