Solutions

Virtual Try-On API

Validate keys, track sessions, and measure engagement with a secure REST API behind the SDK.

API endpoints for production stores

The JavaScript SDK calls these endpoints automatically, but they're also available directly for custom integrations, headless storefronts, or server-side analytics pipelines. All endpoints are key-scoped: every request is validated against your public API key and its allowed-domains list.

Core endpoints

  • /api/sdk/validate
  • /api/sdk/tryon-session
  • /api/analytics/track

POST /api/sdk/validate checks that an API key is active and the requesting domain is allowlisted — call it before opening a try-on session in a custom integration. POST /api/sdk/tryon-session records a try-on click, enforces your plan's product limit, and returns whether the product is new or previously tried on. POST /api/analytics/track accepts generic SDK-originated analytics events for custom event pipelines.

Security model

Public keys (prefixed pk_live_) are safe to expose client-side — they're scoped to your allowed domains and can't modify account settings. Secret keys are never exposed to the browser and are reserved for authenticated, server-side dashboard operations.

Building a custom integration

If your storefront isn't Shopify or WooCommerce — a headless commerce build, a custom Next.js storefront, or an internal admin tool — you can call these endpoints directly instead of using the bundled SDK, giving you full control over the UI while Tryonixs handles validation, session limits, and analytics.

Frequently asked questions

How are API keys secured?

Public keys are scoped to your allowed-domains list and safe to expose client-side. Private/administrative operations require an authenticated dashboard session, never the public key alone.

Does the API enforce my plan's product limit?

Yes. POST /api/sdk/tryon-session checks your subscription's product_limit before recording a new product try-on and returns an error if you've reached it — existing products already tried on remain unaffected.

Is there a rate limit on API requests?

There's no hard rate limit for normal storefront traffic — try-on sessions are lightweight analytics writes, and the API is designed to handle dozens of concurrent shoppers without any special configuration.

Launch virtual try-on today

Free Starter plan — 15 products, unlimited try-on sessions, no credit card required.

Create free account
Contact us