Virtual Try-On

AI size recommendation

Recommend a product size given the product image and a size chart.

post/v1/size-recommendation

Request

  • Base URL: https://api.crayonz.ai
  • URL: https://api.crayonz.ai/v1/size-recommendation
  • Auth: API key in header X-API-Key

Request body

imagestring required

Product image URL, or a photo of the shopper when imageType is "person"

sizeChartstring required

The size chart as plain text (max 10,000 chars)

imageType'product' | 'person'

"person" recommends for the shopper in the photo; default "product" recommends for an average adult

availableSizesstring[]

Allowed size labels; the answer is validated against them

Example request

{
  "image": "https://example.com/tee.png",
  "sizeChart": "S: chest 36in, M: chest 40in, L: chest 44in, XL: chest 48in",
  "availableSizes": [
    "S",
    "M",
    "L",
    "XL"
  ]
}

Response

Success

recommendedSizestring

Exact label from the size chart (or from availableSizes when given)

reasoningstring
confidencenumber

From 0 to 1; omitted when the model did not report one

Changes

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