Prerequisites — before implementing AI Try-On, complete the Cookie consent and Installation steps on the JS Library page. Kleep must not load until the visitor has consented via your CMP, and the library must be loaded site-wide.
AI Try-On is available on demand. If you’re unsure whether this feature is enabled for your account, contact your Kleep representative.
What AI Try-On does
AI Try-On lets shoppers see products on themselves. Clicking a Try it on button on your product page opens the virtual try-on in a full-screen overlay: the shopper takes a selfie and a full-body photo, and Kleep generates a photorealistic image of them wearing the product. Closing the overlay brings them back to your product page.Product feed requirements
AI Try-On is built from the product feed you already send to Kleep — no extra file is needed. For each product, Kleep picks one on-model photo among itsimages, crops the model’s head out of it, and generates the try-on from that photo. Your products file (see the Product template) must meet these conditions:
- Image URLs must be publicly accessible. Kleep downloads them server-side, so no authentication or hotlink protection, and standard formats (JPEG, PNG, WebP). Use the same high-resolution image as on your product page.
- Keep image URLs stable. Changing a product’s photo resets its try-on setup, and the product has to be activated again.
- New products aren’t picked up automatically yet. After a collection drop, tell your Kleep representative so the new products get set up.
Methods
kleep.vto — Open the virtual try-on
-
Add a button where you want the CTA on the product page:
-
Call
kleep.vtowhen the shopper clicks it:
We leave the markup and CSS styling of the button to you.
kleep.vto reuses the public_id, product_id and lang you passed to kleep.load, so make sure kleep.load ran first on the product page.Parameters
All parameters are optional whenkleep.load has been called on the page. Pass them to open the try-on for another product, or on a page where kleep.load isn’t called:
Behaviour
- The try-on opens in a full-screen overlay on top of your page. The page behind it doesn’t scroll.
- Shoppers close it with the ✕ button, the Escape key, or from inside the try-on. Only one overlay can be open at a time.
- The flow is stateless: closing the overlay discards the photos and the result.
- Camera access requires HTTPS. If your site sends a
Content-Security-Policyheader with aframe-srcdirective, addhttps://vto.kleep.aito it.
