Skip to main content
POST
cURL
このエンドポイントを使用すると、1 枚の人物画像と 1 枚の衣服画像からバーチャル試着画像を生成できます。

呼び出す前に

  • human_image を 1 つと cloth_image を 1 つ指定します
  • kolors-virtual-try-on-v1 または kolors-virtual-try-on-v1-5 から始めます
  • 最初のテストでは、きれいな衣服の商品画像または白背景の衣服画像を使用します

タスクの流れ

1

試着タスクを送信する

人物画像と衣服画像を送信し、返された task id を保存します。
2

タスクをポーリングする

対応する Kling の画像クエリパスをポーリングし、タスクが終了状態に達してレンダリング済み画像を返すまで待ちます。
3

結果を永続化する

試着結果をより長く保持する必要がある場合は、完成した画像を独自のストレージに保存します。
完全なパラメータリファレンスについては、公式の Kling ドキュメントを参照してください。

承認

Authorization
string
header
必須

Bearer token authentication. Use your CometAPI key.

ヘッダー

Content-Type
string
デフォルト:application/json

Must be application/json.

ボディ

application/json
human_image
string
必須

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.

cloth_image
string
必須

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.

model_name
enum<string>
デフォルト:kolors-virtual-try-on-v1

Virtual try-on model version. Defaults to kolors-virtual-try-on-v1.

利用可能なオプション:
kolors-virtual-try-on-v1,
kolors-virtual-try-on-v1-5
callback_url
string

Webhook URL for task status notifications.

external_task_id
string

Optional user-defined task ID for your own tracking. Must be unique per account.

レスポンス

200 - application/json

Task request accepted or an error response returned by the API.

code
必須

Response code. 0 means the task request was accepted.

message
string
必須

Response message.

data
object
必須
request_id
string

Request identifier returned when present.