TryItOn
API Reference

OpenAPI Specification

Download the OpenAPI 3.1 spec of the virtual try-on API to import it into Postman or Insomnia, generate a client, or hand it to an LLM agent.

The whole public virtual try-on API (https://tryiton.now/api/v1) is described in one OpenAPI 3.1 file:

GET https://docs.tryiton.now/openapi.yaml

What the spec covers

The spec describes 14 operations:

AreaOperations
Photo try-onPOST /tryon/fashion, POST /tryon/hairstyle, POST /tryon/tattoo
Jobs and accountGET /status/{id}, GET /credits, GET /health
Live, serverGET /live/config, POST /live/garments, POST /live/sessions, GET /live/sessions/{id}, POST /live/sessions/{id}/stop
Live, browserPOST /live/sessions/{id}/heartbeat, POST /live/sessions/{id}/garments/{garmentId}, POST /live/sessions/{id}/end

Each operation comes with its request and response schemas, required fields, defaults, limits, enums, examples, and the error.name values it can return. The storefront widget's embed routes and TryItOn's internal routes are not part of the public API, so the spec leaves them out.

Authentication. Most operations take your API key as Authorization: Bearer YOUR_API_KEY. GET /health takes no credential. The three live browser endpoints take the session's clientSecret instead, so the spec marks them as needing no API key. See Live Try-On Browser Endpoints.

What you can do with it

  • Postman or Insomnia. Import the URL above as a new collection. Set the collection's bearer token to your API key and every request is ready to send.
  • Client generation. Point a generator such as OpenAPI Generator at the file to build a client in a language the official SDKs don't cover.
  • LLM agents. Give the URL to an agent or a tool-calling framework. It describes every operation, parameter and error in a form a model can follow, so the agent can call the API without guessing.

SDKs or a generated client?

For Node.js, Python, Go, PHP and Ruby, use the official virtual try-on SDKs rather than a generated client. They're written by hand on top of the same contract and add what a generator can't: waiting for a job's result with polling and a timeout, one error type that carries error.name, and the live session calls shaped for handing the start response to the browser. For the browser side of live try-on, use tryiton-live.

Source of truth

The spec is kept next to the API's code and is the source of truth for the API's behavior. A test checks its operations against the server's routes on every run, and all five SDKs run a shared set of contract test cases kept alongside it. When the API changes, the spec, the SDKs and these docs change together.

On this page