Skip to content

Generate Image

Generate a realistic image of a person wearing specified clothing.

POST /generate_image
FieldTypeRequiredDescription
selfie_base64stringYesBase64-encoded selfie image
clothing_descriptionstringYesDescription of clothing to try on
clothing_image_urlstringNoURL of a reference clothing image
modestringYes"studio" (white background) or "environment" (contextual)
Terminal window
curl -X POST https://mcll3bnfubyazfg6wekv3xc6fi0dgpyk.lambda-url.us-east-1.on.aws/generate_image \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"selfie_base64": "BASE64_ENCODED_IMAGE",
"clothing_description": "Black leather jacket with white t-shirt underneath",
"mode": "studio"
}'
Terminal window
curl -X POST https://mcll3bnfubyazfg6wekv3xc6fi0dgpyk.lambda-url.us-east-1.on.aws/generate_image \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"selfie_base64": "BASE64_ENCODED_IMAGE",
"clothing_description": "Oversized denim jacket",
"clothing_image_url": "https://example.com/jacket.jpg",
"mode": "environment"
}'
FieldTypeDescription
image_base64stringBase64-encoded generated image
mime_typestringImage MIME type (e.g. "image/jpeg")
{
"image_base64": "/9j/4AAQSkZJRgABAQ...",
"mime_type": "image/jpeg"
}

Generates the person against a clean white/studio background. Best for product photography and professional shots.

Generates the person in a contextual environment (street, office, etc.). Best for lifestyle imagery.

  • Processing time: 10-30 seconds depending on complexity
  • The selfie should be a clear, well-lit photo showing at least the upper body
  • Clothing descriptions that are specific tend to produce better results
  • Including a clothing_image_url significantly improves accuracy
{
"error": "selfie_base64 is required"
}
{
"error": "clothing_description is required"
}