Skip to main content

API Documentation

Genlook offers a powerful REST API for developers who want to integrate virtual try-on capabilities into custom applications, mobile apps, or other platforms.

Getting Started

Step 1: Contact Our Team

To get started with the Genlook API, please contact our team to request API access. We'll provide you with your API keys and any additional setup instructions.

Contact us:

Step 2: Base URL

All API requests should be made to:

https://api.genlook.app

Authentication

All API requests require authentication using your API key. Include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

API Features

  • RESTful Design: Clean, predictable endpoints using standard HTTP verbs and JSON responses
  • High Scalability: Built on serverless GPU infrastructure to handle thousands of concurrent requests
  • Webhooks: Receive real-time notifications when generations are complete
  • Wide Garment Support: Support for tops, bottoms, dresses, outerwear, eyewear, caps, hats, and more
  • Batch Processing: Generate multiple try-ons at once for catalog processing

Supported Garment Types

The Genlook API supports a wide range of clothing items and accessories:

  • Upper body: T-shirts, shirts, sweaters, jackets
  • Lower body: Jeans, trousers, skirts, shorts
  • Full body: Dresses, jumpsuits, coats
  • Accessories: Eyewear, caps, hats, and more

Endpoints

Create Try-On Request

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

Endpoint: POST /v1/try-on

Request Body:

{
"model_image": "https://example.com/user-photo.jpg",
"garment_image": "https://example.com/product.jpg",
"category": "tops",
"webhook_url": "https://your-app.com/webhook"
}

Parameters:

  • model_image (required): URL of the user/model photo
  • garment_image (required): URL of the product/garment image
  • category (required): Category of the garment. Options: tops, bottoms, dresses, outerwear, eyewear, caps
  • webhook_url (optional): URL to receive completion notification

Response:

{
"id": "gen_123abc",
"status": "processing",
"eta_seconds": 8
}

Get Generation Status

Check the status of a generation request.

Endpoint: GET /v1/try-on/{id}

Response:

{
"id": "gen_123abc",
"status": "completed",
"result_image": "https://cdn.genlook.app/results/gen_123abc.jpg",
"created_at": "2025-01-20T10:30:00Z",
"completed_at": "2025-01-20T10:30:08Z"
}

Status Values:

  • processing: Generation is in progress
  • completed: Generation completed successfully
  • failed: Generation failed (check error message)

Batch Processing

Generate multiple try-ons at once.

Endpoint: POST /v1/try-on/batch

Request Body:

{
"requests": [
{
"model_image": "https://example.com/user1.jpg",
"garment_image": "https://example.com/product1.jpg",
"category": "tops"
},
{
"model_image": "https://example.com/user2.jpg",
"garment_image": "https://example.com/product2.jpg",
"category": "dresses"
}
],
"webhook_url": "https://your-app.com/webhook"
}

Webhooks

When you provide a webhook_url, we'll send a POST request to that URL when the generation is complete.

Webhook Payload:

{
"id": "gen_123abc",
"status": "completed",
"result_image": "https://cdn.genlook.app/results/gen_123abc.jpg",
"created_at": "2025-01-20T10:30:00Z",
"completed_at": "2025-01-20T10:30:08Z"
}

Image Requirements

Supported Formats

  • JPG/JPEG
  • PNG
  • WebP

Size Limits

  • Maximum file size: 10MB per image
  • Recommended resolution: 1024x1024 or higher

Best Practices

  • Product images: Use clear product photos on plain backgrounds for best results
  • User photos: Mirror selfies or front-facing photos work best
  • Lighting: Ensure good lighting in both images
  • Background: Plain backgrounds help the AI better understand the garment

Performance & Pricing

Performance

  • Average generation time: ~8 seconds per request
  • Uptime: 99.9% API uptime SLA available for enterprise customers
  • Global CDN: Fast asset delivery worldwide

Pricing

  • Per generation: $0.10 per generation
  • Volume discounts: Available for high-volume customers
  • Enterprise pricing: Custom quotes available

Contact our sales team at sales@genlook.app for volume discounts and enterprise pricing.

Error Handling

The API uses standard HTTP status codes:

  • 200 OK: Request successful
  • 201 Created: Generation request created
  • 400 Bad Request: Invalid request parameters
  • 401 Unauthorized: Invalid or missing API key
  • 402 Payment Required: Insufficient credits
  • 429 Too Many Requests: Rate limit exceeded
  • 500 Internal Server Error: Server error

Error Response Format:

{
"error": {
"code": "INVALID_IMAGE_URL",
"message": "The provided image URL is not accessible",
"details": {}
}
}

Rate Limits

  • Default: 100 requests per minute
  • Enterprise: Custom rate limits available

If you exceed the rate limit, you'll receive a 429 Too Many Requests response.

Sandbox Environment

We provide a sandbox environment where you can test your integration without using your production credits. Contact our sales team to get access to the sandbox environment.

Sandbox Base URL:

https://api-sandbox.genlook.app

Code Examples

cURL

curl -X POST https://api.genlook.app/v1/try-on \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model_image": "https://example.com/user-photo.jpg",
"garment_image": "https://example.com/product.jpg",
"category": "tops",
"webhook_url": "https://your-app.com/webhook"
}'

JavaScript (Node.js)

const response = await fetch('https://api.genlook.app/v1/try-on', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
model_image: 'https://example.com/user-photo.jpg',
garment_image: 'https://example.com/product.jpg',
category: 'tops',
webhook_url: 'https://your-app.com/webhook',
}),
});

const data = await response.json();
console.log(data);

Python

import requests

url = "https://api.genlook.app/v1/try-on"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {
"model_image": "https://example.com/user-photo.jpg",
"garment_image": "https://example.com/product.jpg",
"category": "tops",
"webhook_url": "https://your-app.com/webhook"
}

response = requests.post(url, json=data, headers=headers)
print(response.json())

Enterprise Support

For custom enterprise quotes, volume discounts, dedicated support, or custom integrations, contact our sales team:

Support

Need help with the API?