Developer Docs
Documentation
Everything you need to integrate TryyOnYou into your store. Simple, powerful, and easy to use.
Getting Started
Welcome to TryyOnYou! Follow these steps to get your virtual try-on widget up and running on your store.
Quick Start
- Create an account at tryyonyou.online/signup
- Copy your API key from the dashboard
- Install the widget by adding the code to your theme
- Test it out on a product page
Widget Installation
Shopify Installation
Add the following code to your Shopify theme's theme.liquid file, just before the closing </body> tag.
<!-- TryyOnYou Widget --> <script> window.TRYON_API_KEY = "your_api_key_here"; window.TRYON_API_URL = "https://tryyonyou.online/api/generate-tryon"; </script> <script src="https://tryyonyou.online/widget/tryon-widget.js"></script> <link rel="stylesheet" href="https://tryyonyou.online/widget/tryon-widget.css">
Configuration Options
| Option | Type | Description |
|---|---|---|
| TRYON_API_KEY | string | Your API key (required) |
| TRYON_API_URL | string | API endpoint URL |
| TRYON_BUTTON_TEXT | string | Custom button text |
API Reference
POST
/api/generate-tryonGenerate a virtual try-on image by combining a person photo with a garment.
Headers
X-API-Key: your_api_key
Content-Type: application/jsonRequest Body
{
"person_image": "base64_encoded_image_or_url",
"garment_image": "base64_encoded_image_or_url"
}Response
{
"success": true,
"image": "base64_encoded_result_image",
"usage": {
"current": 45,
"limit": 500,
"remaining": 455
}
}Error Responses
401Invalid or missing API key
429Rate limit exceeded
500AI processing error
Example Request (cURL)
curl -X POST https://tryyonyou.online/api/generate-tryon \
-H "Content-Type: application/json" \
-H "X-API-Key: your_api_key" \
-d '{
"person_image": "<base64_encoded_image>",
"garment_image": "<base64_encoded_image>"
}'Authentication
All API requests must include your API key in the X-API-Key header.
Getting Your API Key
- Log in to your dashboard
- Navigate to the Installation page
- Copy your API key
Security Best Practices
- Never expose your API key in client-side code
- Use the widget for frontend integrations
- Regenerate your key if you suspect it has been compromised
- Use environment variables to store your API key
Need Help?
Can't find what you're looking for? Our support team is here to help you get set up.
Contact Support