AI tasks are asynchronous. Prefer webhook-based completion handling when the feature supports webhooks. Configure your webhook endpoint, verify webhook signatures, and use the received task_id to query the task result after a success or error notification. See the webhook integration guide for setup and verification details.
If webhooks are not supported or cannot be used in your integration, implement polling. After submitting an AI task, poll the status endpoint at regular intervals (e.g., every 10 seconds) until the task status is success or error.
Url of the file to run task. The url should be publicly accessible.
Urls of 1 to 9 reference photos, one garment per photo. The n-th photo is the garment whose category is the n-th entry of garment_categories. The url should be publicly accessible.
[ "https://example.com/full_body.jpg", "https://example.com/shoes.jpg" ]
Category of each reference photo, in the same order and with the same length as ref_file_urls (or ref_file_ids). At most one garment per category, except up to 3 for accessory; full_body cannot be combined with upper_body or lower_body.
[ "full_body", "shoes" ]
How to wear the garments, e.g. "jacket open", "top tucked in" or "bag cross body". It can change only how the garments are worn, not the garments, the person or the pose. Any part that cannot be applied is skipped and listed in not_applied of the result.
- https://yce-api-01.makeupar.comhttps://yce-api-01.makeupar.com/s2s/v2.0/task/cloth-mix-v2
curl -i -X POST \
https://yce-api-01.makeupar.com/s2s/v2.0/task/cloth-mix-v2 \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"src_file_url": "https://example.com/selfie.jpg",
"ref_file_urls": [
"https://example.com/full_body.jpg",
"https://example.com/shoes.jpg"
],
"garment_categories": [
"full_body",
"shoes"
],
"styling_note": "top tucked in"
}'{ "status": 200, "data": { "task_id": "grH0CvsgXuAIHLUzD0V1Ol34hoet3R1tvdbtiVHrDb6_UqCLKIejAIajwxrhOAfe" } }