Skip to content
APIonWeb

Developer Docs

Requests

Browse documentation

All Virtual Try-On requests are POST requests to /v1/virtual-try-on with a JSON body. This page documents the request shape in full; for category-specific worked examples see Virtual Try-On.

Headers

Required headers
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Body fields

Field Type Required Description
category string Yes One of the supported categories — see Virtual Try-On.
person_image string (URL) Yes A publicly reachable URL of the photo to try the product on.
product_model string (URL) Real-time/3D categories only URL of the product's 3D model asset (glasses, sunglasses, hats, jewelry, shoes).
product_image string (URL) AI-generative categories only URL of a flat product photo (shirt, tshirt, dress, jacket, pants).
products array full_outfit only Array of {"type": "...", "image": "..."} objects, one per garment.
webhook_url string (URL) No Optional callback URL for asynchronous categories. See Webhooks.

Image inputs

  • Images are referenced by URL, not uploaded as multipart form data — host them somewhere APIonWeb can fetch them over HTTP(S) (your own storage, a CDN, S3, etc.).
  • A URL that is unreachable, times out, or isn't a valid image returns 422 invalid_image.
  • A malformed or unreachable 3D model returns 422 invalid_model.
  • Sending a category APIonWeb doesn't recognize returns 422 unsupported_category.

The status endpoint

For asynchronous categories, check job status with:

GET /v1/virtual-try-on/{request_id}

No request body — just the Authorization header, using the same API key that submitted the original request. A request_id that doesn't exist (or belongs to a different account) returns 404 not_found.

Next: Responses for the shape of what comes back.