POST /tryon-api
Generate a virtual try-on by combining a shopper photo with a product image.Endpoint
Request body
Image formats
BothuserPhoto and productImage accept a public URL or a Base64 string.
URL (recommended for server-to-server):
Wedding-dress mode (train rendering)
The try-on engine normally drops the train of long / wedding gowns. SetproductType: "wedding-dress" to render the full gown including the train spread on the floor.
Example request
productType: "wedding-dress" is specific to bridal mode — every other field is identical to a standard try-on.
Train evaluation and refunds
After generation, the engine scores how well the train (the gown’s trailing fabric) was rendered. The verdict is returned in thebridal object:
bridal.applied: true→ the train was rendered satisfactorily. 2 credits are consumed.bridal.applied: false→ the train was not rendered (lowtrainScore). No credit is consumed — both credits are refunded and the result is still delivered without regeneration.
Best results
- Both the customer and the gown photos should be full-length, front-facing, standing.
- A cropped, angled, or partial customer photo noticeably degrades the result.
Never breaks. If the pre-treatment can’t run, the request falls back to a standard try-on (gown rendered without the train) — it does not return an error.
Success response — 200 OK
Train not rendered (verdict fail)
Whenbridal.applied is false, the train was not rendered. Both credits are refunded and the result is still delivered — there is no regeneration.
trainScore may be null if the sidecar /score endpoint is unavailable. The result is still delivered, but without a refund (the verdict could not be evaluated).Error responses
If the wedding-dress pre-processing crashes, the request returns: