上传图片
POST /openapi/v2/image/upload
说明
图生视频/首尾帧都需要先上传图片, 通过img_id 完成生成. 生成时需要传image文件的路径 支持格式 : "png", "webp", "jpeg", "jpg" . 支持 mime-type "image/jpeg","image/jpg","image/png","image/webp" 最大支持 10000px 以内的图片
概览
| Method | POST |
|---|---|
| Path | /openapi/v2/image/upload |
| Type | http |
| Status | 1 |
| Module | 2102810 |
| Folder | 86260306 |
参数
{ "header": [ { "required": false, "description": "", "type": "string", "id": "lcnFmgmiEw", "enable": true, "name": "API-KEY", "sampleValue": "{{YOUR_API_KEY}}" } ] }
请求体
{ "type": "multipart/form-data", "parameters": [ { "required": false, "description": "重要提示:上传图片时,必须使用携带本地图片文件路径的 form-data 格式,目前不支持通过 URL 上传图片。", "type": "file", "id": "gtmRfOVR08", "enable": true, "name": "image", "schema": { "format": "binary", "type": "string" }, "sampleValue": "" }, { "required": false, "description": "支持url 上传. 只传 image or image_url即可. 只支持一下格式/mime-type: \"image/jpeg\",\"image/jpg\",\"image/png\",\"image/webp\"", "type": "string", "id": "rflAKY4E3g", "enable": true, "name": "image_url", "sampleValue": "" } ], "required": true, "mediaType": "", "examples": [], "oasExtensions": "" }
响应
[ { "id": 103325397, "name": "成功", "code": 200, "contentType": "json", "jsonSchema": { "type": "object", "properties": {} }, "itemSchema": {}, "description": "", "mediaType": "", "headers": [] } ]