Skip to content
superstyle

Try On Outfit

Generate a realistic image of a person wearing an outfit, from a reference image and/or description. Guardrails are enforced by Nano Banana 2.

POST /try_on_outfit
FieldTypeRequiredDescription
selfie_base64stringYesBase64-encoded selfie image
clothing_descriptionstringYesDescription of clothing to try on
clothing_image_urlstringNoURL of a reference clothing image
outfit_base64stringNoBase64-encoded reference clothing image (alternative to clothing_image_url)
modestringYes"reference_environment" (match the reference image scene) or "model_shot" (clean white background)
store_imagebooleanNoIf true, image is stored permanently. If false (default), image auto-deletes after 24 hours.
Terminal window
curl -X POST https://mcll3bnfubyazfg6wekv3xc6fi0dgpyk.lambda-url.us-east-1.on.aws/try_on_outfit \
-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": "model_shot"
}'
Terminal window
curl -X POST https://mcll3bnfubyazfg6wekv3xc6fi0dgpyk.lambda-url.us-east-1.on.aws/try_on_outfit \
-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": "reference_environment"
}'
FieldTypeDescription
image_urlstringDirect URL of the generated image. Auto-deletes after 24 hours when store_image=false (default), permanent when true.
image_idstringUnique image identifier (e.g. "img_a1b2c3d4e5f6..."). Use with GET /images/:id to retrieve metadata.
mime_typestringImage MIME type (e.g. "image/jpeg")
{
"image_url": "https://superstyle-user-images.s3.us-east-1.amazonaws.com/temp/ss_abc123/generate-image/20260228T153000Z_a1b2c3.jpg",
"image_id": "img_a1b2c3d4e5f6a1b2c3d4e5f6",
"mime_type": "image/jpeg"
}

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

Places the person into the scene and environment of the reference image. Best for lifestyle imagery where you want to match the vibe of an inspiration photo.

  • 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"
}