Tạo một virtual try-on với Kling
Sử dụng API Kling Virtual Try-On của CometAPI để tạo ảnh thử đồ từ ảnh người và ảnh trang phục.
Trước khi gọi
- Cung cấp một
human_imagevà mộtcloth_image - Bắt đầu với
kolors-virtual-try-on-v1hoặckolors-virtual-try-on-v1-5 - Dùng ảnh sản phẩm quần áo rõ nét hoặc ảnh trang phục nền trắng cho lần thử đầu tiên
Luồng tác vụ
Gửi tác vụ try-on
Poll tác vụ
Lưu kết quả
Ủy quyền
Bearer token authentication. Use your CometAPI key.
Tiêu đề
Must be application/json.
Nội dung
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.