建立 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.