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

  1. Create an account at tryyonyou.online/signup
  2. Copy your API key from the dashboard
  3. Install the widget by adding the code to your theme
  4. 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

OptionTypeDescription
TRYON_API_KEYstringYour API key (required)
TRYON_API_URLstringAPI endpoint URL
TRYON_BUTTON_TEXTstringCustom button text

API Reference

POST/api/generate-tryon

Generate a virtual try-on image by combining a person photo with a garment.

Headers

X-API-Key: your_api_key
Content-Type: application/json

Request 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

  1. Log in to your dashboard
  2. Navigate to the Installation page
  3. 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