创建一个 Kling 虚拟试衣
使用 CometAPI Kling Virtual Try-On API,通过人物图片和服装图片创建一张试衣图。
调用前准备
- 提供一张
human_image和一张cloth_image - 从
kolors-virtual-try-on-v1或kolors-virtual-try-on-v1-5开始 - 首次测试时,使用干净的服装产品图或白底服装图片
任务流程
提交试衣任务
轮询任务
保存结果
授权
Bearer token authentication. Use your CometAPI key.
请求头
Must be application/json.
请求体
Person image to dress. Image URL or raw Base64 string without a data: prefix. Supported formats: JPG, JPEG, PNG. Maximum 10 MB, minimum 300x300 px, aspect ratio between 1:2.5 and 2.5:1.
Clothing image for the try-on. Image URL or raw Base64 string without a data: prefix. Supported formats: JPG, JPEG, PNG. Maximum 10 MB, minimum 300x300 px, aspect ratio between 1:2.5 and 2.5:1. Supports tops, bottoms, and one-piece dresses.
Virtual try-on model version. Defaults to kolors-virtual-try-on-v1.
kolors-virtual-try-on-v1, kolors-virtual-try-on-v1-5 Webhook URL for task status notifications.
Optional user-defined task ID for your own tracking. Must be unique per account.