Multimodal AI

Virtual Try-On API

Generate wearable-product imagery from a source person image and target product image.

post/api/skill-api/v1/skills/virtual-try-on/run

Request

  • Base URL: https://api.nexscope.ai
  • URL: https://api.nexscope.ai/api/skill-api/v1/skills/virtual-try-on/run
  • Auth: HTTP bearer

Headers

X-Nexscope-Http-Status'legacy' | 'semantic'

Use semantic for HTTP error statuses on run and task-result requests. Without this header v1 retains legacy status behavior. The JSON envelope is unchanged; code 0 means success or acceptance, not asynchronous completion.

Request body

imageUrlstring required

Public URL of the wearable product image. The image must be between 300 and 4096 pixels in both width and height. The width-to-height ratio must be between 0.4 and 2.5.

targetOriginUrlstring required

Public URL of the person or model image.

targetMaskUrlstring required

Public URL of the black-and-white target wear-area mask. Required because this API accepts custom target images rather than saved upstream materials.

productCategorystring

Product category. Supported values: footwear (shoes), luggage (bags), eyewear (glasses), necklace, hat, earring, ring, wristband, watch, headwear, belt, other.

outputNuminteger

Number of images to generate, from 1 to 4. Defaults to 1.

Example request

{
  "imageUrl": "https://example.com/product.jpg",
  "targetOriginUrl": "https://example.com/model-reference.jpg",
  "targetMaskUrl": "https://example.com/mask.png",
  "productCategory": "hat",
  "outputNum": 1
}

Response

Successful response.

codeinteger required

0 means accepted or successful; nonzero is a platform error.

msgstring nullable required
tsstring required

Epoch milliseconds.

timestring required

Server local time: yyyy-MM-dd HH:mm:ss.

coststring required

Elapsed milliseconds, never credits; -1 outside web requests.

traceIdstring nullable required

Changes

No recorded changes to this operation across all 1 revision of this API.