Versions. The examples below use
lucy-vton-latest. lucy-vton-3.6 is also available on both surfaces at 720p — note it does not support fast mode.Quick start (Realtime)
Realtime Parameters
prompt— Text description of the outfit change. Use the substitute or add patterns described in the VTON 3.5 Prompting Guide.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.speed— Connect-time option."fast"opts into fast mode: lower latency and higher throughput, billed at 2x the standard realtime rate. Omit for standard mode.
Fast mode
Fast mode (speed: "fast") gives the session lower latency and higher throughput; output quality is unchanged. It is available for lucy-2.5 / lucy-latest and lucy-vton-3.5 / lucy-vton-latest and is billed at 2x the standard realtime rate for those models. Other models ignore the option. Omit it (the default) for standard mode. See Pricing.
Fast mode is a connect-time setting: pass speed: "fast" when connecting. Changing it requires a reconnect; it can’t be toggled mid-session with set().
Standard mode is the absence of the option — don’t send
speed=standard. The option ships in JavaScript v0.2.2, Python v0.2.1, Android 0.8.1 and Swift v0.7.1; on earlier @decartai/sdk versions pass queryParams: { speed: "fast" } instead.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 expire 60 seconds after minting by default. Fetch one per dial with
apiKeyProvider, as above, rather than minting when the page loads. Active WebRTC sessions continue working after the token expires. See Token lifetime.Prompting
For how to write effective try-on prompts — patterns, examples, and common mistakes — see the VTON 3.5 Prompting Guide.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 from the prompting guide. 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) — a 2:1 (landscape) / 1:2 (portrait) shape is also supported
- File Size: Maximum 200MB
- Output Resolution: 1280×720 / 720×1280 (16:9 / 9:16) or 1280×640 / 640×1280 (2:1 / 1:2)
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.