Soft tailoring, easy layers
The cropped jacket gives the wide-leg trouser a waist to work against; the ribbed tank keeps the layering light.
● Try-on API · SDK v1.3 · REST + signed webhooks
Riti renders up to four garments onto a shopper’s own photo in one pass, styles them into ranked looks, and attributes every order that follows. One script tag goes on any storefront, with a multi-tenant API behind it.
<!-- 1. Load the SDK (versioned, SRI-hashed) --> <script src="https://api.rititech.app/sdk/v1/riti.js"></script> <div id="riti"></div> <script> Riti.init({ publishableKey: "pk_test_51Nw…", onAddToCart(items) { cart.add(items) }, // each carries eventId }); Riti.mount("#riti", { product: { id: "JK-104", title: "Linen Jacket", imageUrl, url, price: 148, variants } }); Riti.launcher({ label: "Fitting room" }); </script>
// Your backend reports the order. Lines carrying a // Riti eventId are credited; repeats are idempotent. await fetch("https://api.rititech.app/api/v1/conversions", { method: "POST", headers: { Authorization: `Bearer ${process.env.RITI_SECRET_KEY}` }, body: JSON.stringify({ orderId: "1042", currency: "USD", lineItems: [ { lineItemId: "1042-1", productId: "jacket-001", quantity: 1, unitPrice: 148, eventId }, { lineItemId: "1042-2", productId: "trouser-014", quantity: 1, unitPrice: 128, eventId }, ], }), }); // 202 { attributed: 2, ignored: 0 }
// Riti-Signature: t=1792248000,v1=9b1f… (HMAC-SHA256 of "t.rawBody") const parts = Object.fromEntries(header.split(",").map(p => p.split("="))); const expected = crypto.createHmac("sha256", endpointSecret) .update(`${parts.t}.${rawBody}`).digest(); const given = Buffer.from(parts.v1 || "", "hex"); if (given.length !== expected.length || !crypto.timingSafeEqual(given, expected)) return res.sendStatus(400); switch (event.type) { case "look.saved": return sendLookEmail(event.data); // if consented case "conversion.attributed": return record(event.data); }
input.jpgrender · 3 garments
Engine
The engine layers every garment in the look onto the shopper’s own photo in a single render. Shoppers see what they would actually wear, and you pay for one outfit instead of four previews.
Stylist
Wearable combinations are computed from your catalogue first (a top and bottom or a dress, plus optional outerwear, shoes and an accessory), then ranked. Every criticism ships with a swap; a criticism with no wearable alternative is dropped.
The cropped jacket gives the wide-leg trouser a waist to work against; the ribbed tank keeps the layering light.
The same trouser without the jacket. The tank’s higher neckline keeps the silhouette from reading top-heavy.
Both hit at the waist, so nothing anchors the outfit and the leg reads shorter.
→ Style these together → 3 looks → add the whole look to cart
Quickstart
The widget, fitting room, stylist and cart hand-off ship inside the SDK. Your backend mints short-lived session tokens and reports orders. Everything else runs on Riti.
01 · browser
Point it at a product. Cart lines come back through your own callback.
Riti.init({ getSessionToken: () => fetch("/riti-session", { method: "POST" }) .then(r => r.json()), onAddToCart(items) {…}, }); Riti.mountAll(); Riti.on("tryon:success", e => {…});
02 · your server
Signed, valid 1 to 60 minutes, pinned to an origin and carrying your own shopper reference.
POST /api/v1/sessions Authorization: Bearer sk_live_… { "ttlSeconds": 900, "origin": "shop.example.com", "shopperRef": "cus_4471" } → 201 { "token": "rst_…", "expiresAt": "…", "livemode": false }
03 · your server
Lines matched to a try-on are credited once per order line, so the revenue is auditable.
POST /api/v1/conversions Authorization: Bearer sk_live_… { "orderId": "1042", "currency": "USD", "lineItems": [{ "lineItemId": "1042-1", "productId": "jacket-001", "quantity": 1, "unitPrice": 148, "eventId": "…" }] } → 202 { "attributed": 1, "ignored": 0 }
Architecture
The browser only ever holds a publishable key or a short-lived session token. Secret keys stay server-to-server. Every tenant query runs under Postgres row-level security, scoped to tenant and mode.
Platform
Isolation, quotas, signatures and versioning are built in, tested against real Postgres, and documented in an OpenAPI 3.1 spec that a test keeps in sync with the routes.
pk_ for the browser, sk_ for servers, each live or test. Hashed at rest, shown once, rolled with a grace window.
Every shopper and usage row carries livemode. Test renders use the real engine and are never billed.
A publishable key only works from your allowed origins. A request with no Origin header is refused.
rst_ tokens, 1–60 min, optionally pinned to one origin. Require them for every caller with one setting.
tryon.succeeded, tryon.failed, cart.added, look.saved, conversion.attributed, catalog.sync.*.
Postgres refuses another tenant’s or mode’s rows even if a filter is missing. A test fails the build if a table lacks a policy.
Daily and period caps are reserved before the provider is called and hold across any number of API instances.
Multiple render providers sit behind a circuit breaker. An unhealthy provider is paused and the next one takes over.
Pin /sdk/v1.3.2/ with integrity hashes from the manifest, or follow /sdk/v1/.
Widget and v1 routes, with a written versioning and deprecation policy.
Owner, developer and viewer roles; keys, origins, widget settings, webhooks, analytics and CSV export.
ready, tryon:*, add-to-cart, look:saved, room:open|close, also dispatched as DOM events.
Console
Flip between test and live data, roll a key without downtime, and redeliver any webhook from its delivery log.
| Key | Type | Status | Last used |
|---|---|---|---|
| pk_test_…4f2a | publishable | active | 2 min ago |
| sk_test_…91cc | secret | active | 14 min ago |
| sk_test_…07be | secret | rolling · 23h left | 1 h ago |
Example data
Attribution
Each cart line carries the try-on’s eventId. When your backend reports the order, matching lines are credited once. The multi-item funnel sits next to the ordinary try-on funnel.
Modules
Optional modules are turned on per tenant and loaded by the SDK only where they are on. The first is Recommendations. The roadmap is listed beside it.
Sync your catalogue by feed or API, and Riti suggests the pieces that complete the look on the product page. Suggestions stay inside a price band you set and come from items you stock.



Security & privacy
Shoppers never create an account. Photos are used for the render; saved looks require an email and explicit consent, and are handed to you via look.saved so you send the email.
SOC 2 compliant infrastructure. Hosting, Postgres and object storage run on Railway, which holds a SOC 2 Type II report. Rendering runs through Google Cloud.
Security details →on the roadmap SSO, a DPA template and regional data residency are planned, not yet available.
Pricing
Usage is metered from the same ledger your console shows. Contract plans are sized to your catalogue and traffic.
Committed volume, caps you set, and a test environment that costs nothing. We size a plan with you after a look at your catalogue and traffic.
Demos
Fictional storefronts running against the production API, with a live webhook feed and isolation probes beside the product page.
The simplest path: one script tag, a pk_ key and an origin allowlist.
See the demo →
Backend-minted rst_ tokens with a shopper ref, order reporting and signed webhooks.
See the demo →FAQ
No. The SDK runs on any site that can load a script, and your cart integration is a single onAddToCart(items) callback. Order reporting is one authenticated POST from your backend.
A publishable key is refused without a browser Origin from your allowlist. For stricter setups, turn on requireSessionToken so every caller needs a token your backend minted with the secret key.
Test keys and tokens produce rows with livemode: false; row-level security scopes every query to the mode, and test renders are never billed.
It is used for the render. Rendered looks are stored under your tenant’s prefix; saved looks require an email and consent, and the email itself is yours to send via the look.saved webhook.
Riti runs multiple providers behind a circuit breaker. Failed renders are not billed, and quota units are returned when the provider was never called.
Riti runs on SOC 2 compliant infrastructure: hosting, Postgres and object storage on Railway, which holds a SOC 2 Type II report, and rendering through Google Cloud. SSO for the console and regional data residency are on the roadmap. We walk through the full stack in a security review.
We set up a test tenant, wire it to one of your product pages, and walk your team through the console.