- It edits a live inbound video stream rather than generating from scratch: the client publishes a
sourcetrack and receives the transformedmain_videotrack back. - A reference image carries visual identity: “the specified character” in your prompt means the image you uploaded, so swaps and insertions anchor to a concrete subject.
- A click-and-drag pointer steers the edited subject in real time, which turns a still image into a controllable animation.
@reactor-models/x2
SDK. For plain JavaScript it has an X2Model class with named methods (setPrompt,
setReferenceImage, setPointer, …). For React 18+ it has an <X2Provider> with hooks (useX2,
one hook per message) and track view components (X2MainVideoView, X2SourceView). It wraps the
same base wire protocol every Reactor model speaks, so you can also drive it from the base
Reactor client by command name. See
Typed Model SDKs.
At a glance
| Spec | Value |
|---|---|
| Model name | xmax/x2 |
| Pricing | Private preview; rate not yet published |
| Output rate | 24 fps (no frame interpolation, no upscaling) |
| Resolution | 832p; aspect ratio follows the source stream, fixed per session |
| Session length | Unlimited; the model edits for as long as the session is open |
| Input | Video stream + text prompt + optional reference image and drag pointer |
new X2Model()), and with the base class you pass it yourself
(new Reactor({ modelName: "xmax/x2" })). The output resolution is not fixed ahead of time. The
model picks a resolution bucket of about 832p to match the incoming source stream’s aspect ratio
at the first generation. That choice holds for the whole session, and arrives in the
generation_started message and the state_update snapshot. See
Pricing & Billing for how billing works.
Key features
Live video-to-video editing
Publish any video stream to the
source track and receive it re-rendered per your prompt on
main_video in real time.Reference-anchored swaps
Upload a reference image of a character or object, then prompt swaps and insertions against it.
Swap it mid-run and the stream restarts, conditioned on the new image from its first block.
Drag-to-steer motion
A drag pointer steers the edited subject while held. Stream a still image as the source and
the pointer becomes a drag-to-animate control.
set_prompt (the change applies from the
next generated block), and trade latency for smoothness per use case with set_keep_backlog. The
prompt guide covers how to write effective prompts.
Quick start
- npm
- pnpm
How it works
On connect the model is live but idle. There is nostart command. To get your first edited stream:
- Connect to the model.
- Publish a video stream to the
sourcetrack: a webcam, a playing clip, or a still image repeated as a constant feed. - Set a prompt with
set_prompt. Generation starts on its own once a non-empty prompt is set and source frames are arriving; thegeneration_startedmessage carries the output resolution. - To anchor a character or object swap, upload and set a reference image with
set_reference_image. Replacing it mid-run restarts the stream, and the new image conditions the edit from its first block. - Steer the edited subject with the drag pointer, and
pick a latency policy with
set_keep_backlog. - Reset with
resetto stop generation and clear the prompt, reference image, and pointer.
X2 generates video one block at a time, and every control follows block semantics: a prompt change
applies from the next block, the model samples the pointer once per block, and the backlog policy
switches at the next block. The model chooses the output resolution once, at the first generation,
from the source stream’s aspect ratio; it stays fixed for the whole session, even across resets.
See the schema for the full surface.