Transform any video in realtime with AI-powered editing at 720p. Lucy 2.6 is a general editing model - capable across edit type, object, and scene.
Use Lucy 2.6 as your default realtime editing model. It is available as
lucy-latest and supports text prompts, reference images, or both in the same integration. Lucy 2.5 remains available as lucy-2.5.What’s new in Lucy 2.6
- Reference adherence. Higher fidelity to the reference image on character, garment, and object edits, including complex or non-clean references.
- Add and replace. Added objects are sized and placed accurately relative to the subject and scene, with better prompt and reference adherence. Small, non-central, and non-human objects are replaced in place at the right scale.
- Character swap. Sharper output with more detail and more natural placement in the frame. Improved lipsync and realism for both photoreal and animated characters.
- Garments. Complex and unusual garments hold their shape and detail throughout the stream.
- Multi-edit. Several edit operations can be combined in a single prompt, for example background replacement and character swap together. Each request still takes one reference image.
Quick start
Installation
- JavaScript
- Python
- Android
Connect and start editing
- JavaScript
- Python
- Android
Model capabilities
Lucy 2.6 is designed as a general editing model - reliable across a wide range of tasks, object types, and input conditions.Edit types
Virtual try-on has a dedicated optimized model. See the Lucy - Virtual try-on model for details.
Use cases
Virtual try-on
Let customers see clothing and accessories on themselves in realtime across a wide range of garment types and materials.
Ad variation
Generate personalized ad creatives at scale. Swap products, backgrounds, or characters across live or pre-recorded content without reshoots.
Social engagement
Give audiences interactive effects, filters, and transformations that drive participation and sharing.
Content monetization
Embed branded products and sponsored placements directly into live video.
Live shopping
Sell any product, in any video. Give sellers the ability to place any item into live content instantly.
Furniture replacement
Swap furniture and home decor in live video, letting customers visualize products in their own space before buying.
Updating the reference image
You can change the reference image at any time without reconnecting. Use theset() method to atomically replace the session state - include all fields you want to keep:
Reference image best practices
Use a clear, well-lit portrait
Consistent, even lighting works best regardless of edit type. For characters, use a front-facing photo. For garments and objects, avoid harsh shadows or reflections that obscure important details.
Match the framing
Match the reference framing to the source video. If the source shows a full-body standing person and you want to swap the character or change clothes, use a full-body reference shot rather than a head-and-shoulders crop.
Avoid occlusion
Make sure the key features of the reference are fully visible. Partially hidden characters, garments, or objects reduce what the model can extract and may affect output quality.
Resolution and format
At least 512×512 pixels recommended. Supported formats: JPEG, PNG, and WebP.
For object replacement
Use a clean product or object shot against a neutral background. The cleaner the separation between subject and background, the more precisely the model can apply it.
For virtual try-on
A front-facing, evenly lit garment shot on a plain background gives the model the clearest signal. Include the full item from collar to hem where possible.
Text-only editing
Lucy 2.6 works without a reference image too. Use text prompts to add, modify, or remove elements in your live video:Prompting guide
See the Lucy 2.6 prompting guide for prompt templates, reference-image guidance, and video examples for each edit type, including combined edits.Connection lifecycle
Lucy 2.6 shares the same connection lifecycle as all realtime models. See the JavaScript SDK, Python SDK, or Android SDK for details on:- Connection states (
connecting,connected,generating,reconnecting,disconnected) - Auto-reconnect with exponential backoff
- Error handling with
DecartSDKError - Session tracking with
generationTickevents - Session viewing with subscribe tokens
Complete example
A full application with character switching, connection management, and error handling:Client-side authentication
For browser and mobile apps, use client tokens instead of your permanent API key.apiKeyProvider rather than on page load. See Token lifetime.
Technical specifications
Portrait mode (9:16)
On mobile devices (iOS/Android), portrait mode works automatically - the OS maps the front camera to a vertical stream regardless of the constraints you pass. For desktop browsers or external webcams, swapwidth and height when calling getUserMedia:
Generation stability
In long sessions, Lucy 2.6 can use its own output as an additional anchor - feeding recent generated frames back as the reference image. This self-anchoring mechanism keeps the output stable over time, preventing drifting. It is enabled by default, so most integrations need to do nothing. Self-anchoring is a connect-time setting. To turn it off, passself_anchor=false as a connection query parameter - the model then anchors only to the live input. Changing it requires a reconnect; it can’t be toggled mid-session with set().
Self-anchoring works best when the scene stays consistent. If the stream changes significantly - a different person enters the frame, the camera cuts, or the scene shifts entirely - the model may still anchor to the last edited frame, which no longer matches the new input. In these cases do not use self-anchoring.
Fast mode
Fast mode (speed: "fast") gives the session lower latency and higher throughput; output quality is unchanged. It is available for lucy-2.6 / lucy-latest, lucy-2.5, lucy-vton-3.6 / lucy-vton-latest, and lucy-vton-3.5, 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.
Like self-anchoring, 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(). The SDK carries the option across its automatic reconnects.
Standard mode is the absence of the option — don’t send
speed=standard or an empty value. If you run a signaling proxy, forward the end user’s speed to the upstream URL, or the session lands on the standard tier.Next steps
Prompting Guide
Prompt templates, reference guidance, and video examples for Lucy 2.6
JavaScript SDK
Full JavaScript SDK reference for realtime features
Python SDK
Full Python SDK reference for realtime features
Android SDK
Full Android SDK reference for realtime features
All Models
Compare all Decart models side by side