Quick start (Realtime)
Realtime Parameters
prompt— Text description of the outfit change. Use the substitute or add patterns described in the prompting guide below.image— A garment reference image to guide the try-on. Supported formats: JPEG, PNG, WebP.enhance— Whether to auto-enhance the prompt (default:true). Set tofalsewhen you provide detailed prompts yourself.
Using Reference Images
For the best results, provide a garment reference image paired with a descriptive prompt. This gives the model the clearest signal of what to apply.- Clean garment images work best — just the clothing item, no person wearing it
- White or plain backgrounds are ideal
- At least 512×512 pixels — the model reproduces what it sees, so a clear image produces better results
- If your source image shows a person wearing the garment, consider using an image editing model to extract just the clothing item first
Dynamic Outfit Changes
Switch outfits instantly during a live session — callsetPrompt() or set() again at any time without reconnecting:
Client Token Security
In production, never expose your permanent API key (dct_*) to the browser. Instead, create a short-lived client token on your server and pass it to the frontend:
Client tokens have a 10-minute TTL. Create a new token each time a user opens a try-on session. Active WebRTC sessions continue working even after the token expires. See the Client Tokens guide for details.
Prompting Guide
Lucy VTON works best with structured prompts that follow a substitute or add pattern. Focus on what needs to change — you don’t need to describe the entire scene.Prompt Patterns
When you don’t know the person’s current outfit, use generic references:
"the current top", "the current bottoms", "the current headwear".
Example Prompts
Prompt Tips
- Be specific — include color, material, texture, pattern, and fit. Aim for 20–30 words.
- Describe only what you see — don’t guess details like zippers or pockets unless they’re clearly visible in the reference image.
- One garment per prompt — combining multiple unrelated changes can produce unpredictable results.
- Reference image + prompt — when you have a garment image, always pair it with a descriptive prompt for maximum control.
- Use
enhance: trueas a fallback — the built-in enhance option can improve short or vague prompts automatically, but detailed prompts you write yourself will produce the best results.
Generating Prompts with an LLM
For user-uploaded garment images where you don’t have a pre-written prompt, you can use any vision LLM (GPT-4o-mini, Claude, Gemini) to auto-generate a descriptive prompt from the garment image:Extracting Clothing from Model Photos
When users upload photos from fashion websites where a model is wearing the garment, the image contains a person and background rather than a clean garment shot. Use an image editing model to extract just the clothing item on a white background before sending it to the try-on model.Batch API
Lucy VTON is also available as a batch/queue model for processing pre-recorded videos asynchronously. Submit a job, poll for completion, then download the result.Batch Parameters
data(required) — Input video of the person to dress.prompt(optional) — Text description of the outfit change. Use the substitute/add patterns above. Defaults to empty string.reference_image(optional) — An image of the garment or accessory to try on.resolution(optional) — Output resolution:720p(default).seed(optional) — Seed for reproducible generation (0–4294967295).enhance_prompt(optional) — Whether to enhance the prompt (default:true).
Video Requirements
- Format: MP4 (H.264 or VP8 codec)
- Aspect Ratio: 16:9 (landscape) or 9:16 (portrait)
- File Size: Maximum 200MB
- Output Resolution: 720×1280 (portrait) or 1280×720 (landscape)
Next steps
Try in the Platform
Try virtual try-on in the interactive platform.
Batch API Reference
Full API documentation for the batch virtual try-on endpoint.
Streaming Best Practices
Optimize your realtime integration for the best experience.
Try-On Examples
Production-ready examples: e-commerce, digital mirror, outfit builder, and more.