数字人
POST /kling/v1/videos/avatar/image2video
概览
| Method | POST |
|---|---|
| Path | /kling/v1/videos/avatar/image2video |
| Type | http |
| Status | -1 |
| Module | 2102810 |
| Folder | 72916199 |
参数
{ "header": [ { "required": false, "description": "", "type": "string", "id": "eJWUthLjcG", "enable": true, "name": "Content-Type", "sampleValue": "application/json" }, { "required": false, "description": "", "type": "string", "id": "X0bD0NOEJr", "enable": true, "name": "Authorization", "sampleValue": "Bearer {{YOUR_API_KEY}}" } ] }
请求体
{ "type": "application/json", "parameters": [], "jsonSchema": { "type": "object", "properties": { "image": { "type": "string", "description": "数字人参考图支持传入图片Base64编码或图片URL(确保可访问)图片格式支持.jpg / .jpeg / .png图片文件大小不能超过10MB,图片宽高尺寸不小于300px,图片宽高比介于1:2.5 ~ 2.5:1之间" }, "audio_id": { "type": "string", "description": "通过试听接口生成的音频的ID仅支持使用30天内生成的、时长不短于2秒切不超过300秒的音频audio_id、sound_file参数二选一,不能同时为空,也不能同时有值" }, "sound_file": { "type": "string", "description": "音频文件;支持传入音频Base64编码或图音频URL(确保可访问);音频文件支持.mp3/.wav/.m4a/.aac,文件大小不超过5MB,格式不匹配或文件过大会返回错误码等信息;仅支持使用时长不短于2秒且不长于300秒的音频;audio_id、sound_file参数二选一,不能同时为空,也不能同时有;系统会校验音频内容,如有问题会返回错误码等信息" }, "prompt": { "type": "string", "description": "正向文本提示词" }, "mode": { "type": "string", "description": "生成视频的模式" }, "callback_url": { "type": "string" }, "external_task_id": { "type": "string" } }, "required": [ "image", "audio_id", "sound_file", "prompt", "mode", "callback_url", "external_task_id" ], "x-apifox-orders": [ "image", "audio_id", "sound_file", "prompt", "mode", "callback_url", "external_task_id" ] }, "required": true, "mediaType": "", "examples": [ { "mediaType": "application/json", "value": "{\r\n \"image\": \"https://h2.inkwai.com/bs2/upload-ylab-stunt/se/ai_portal_queue_mmu_image_upscale_aiweb/3214b798-e1b4-4b00-b7af-72b5b0417420_raw_image_0.jpg\",\r\n \"audio_id\": \"825455158141661278\",\r\n \"sound_file\": \"\",\r\n \"prompt\": \"\",\r\n \"mode\": \"std\",\r\n \"callback_url\": \"\",\r\n \"external_task_id\": \"\"\r\n}" } ], "oasExtensions": "" }
响应
[ { "id": 190236133, "name": "成功", "code": 200, "contentType": "json", "jsonSchema": { "type": "object", "properties": {} }, "itemSchema": {}, "description": "", "mediaType": "", "headers": [] } ]