Skip to main content
X2 is a real-time video-to-video editing model from XMAX. You stream video into it, such as a webcam stream, a video clip, or even a still image. Give it an editing instruction and it streams back a re-rendered version of that video live. A reference image lets you insert or swap a specific character or object into the scene, and clicking and dragging with your mouse lets you steer the edited subject’s motion. Three things set X2 apart from the other models in the catalog:
  • It edits a live inbound video stream rather than generating from scratch: the client publishes a source track and receives the transformed main_video track 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.
The X2 reference is split across four pages: this overview, the complete command and event schema, the prompt guide for writing prompts that steer the model, and an end-to-end tutorial. Build on X2 with the typed @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

SpecValue
Model namexmax/x2
PricingPrivate preview; rate not yet published
Output rate24 fps (no frame interpolation, no upscaling)
Resolution832p; aspect ratio follows the source stream, fixed per session
Session lengthUnlimited; the model edits for as long as the session is open
InputVideo stream + text prompt + optional reference image and drag pointer
The model name is the string you pass when you open a session; the typed SDK bakes it in (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.
Beyond these, you can hot-swap the prompt mid-stream with 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

A minimal connect-and-edit flow looks like:

How it works

On connect the model is live but idle. There is no start command. To get your first edited stream:
  1. Connect to the model.
  2. Publish a video stream to the source track: a webcam, a playing clip, or a still image repeated as a constant feed.
  3. Set a prompt with set_prompt. Generation starts on its own once a non-empty prompt is set and source frames are arriving; the generation_started message carries the output resolution.
  4. 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.
  5. Steer the edited subject with the drag pointer, and pick a latency policy with set_keep_backlog.
  6. Reset with reset to 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.