> ## Documentation Index
> Fetch the complete documentation index at: https://docs.reactor.inc/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Reactor hosts multiple models, each with its own connect slug (modelName) and command/event schema. The catalog of every model — slug, typed SDK package, and links to its schema — is at /model-api-reference/overview. Some models expose one slug per experience (e.g. HappyOyster); always take the slug from the model's own pages, never guess it.
> Fastest path to a working app: `npx create-reactor-app my-app --model=<slug>` scaffolds a complete app with secure auth wired up. Typed TypeScript SDKs are published as @reactor-models/<model>; Python uses the base reactor-sdk package.
> Auth: exchange an API key (rk_...) for a JWT via POST https://api.reactor.inc/tokens from your server. Never put the API key in client-side code.
> Append .md to any docs URL for clean Markdown. Search these docs via the MCP server at https://docs.reactor.inc/mcp.

# Build with Reactor

> Infrastructure purpose-built for real-time video and world models.

<Note>
  These docs cover the `reactor` CLI and deployment, and describe features that are rolling out to
  partners. [Contact us](mailto:team@reactor.inc) for access. Writing the model itself is documented
  at [docs.reactor.inc/deploy](https://docs.reactor.inc/deploy/overview).
</Note>

Reactor is infrastructure for real-time video and world models. You write a Python model, test it
locally, and deploy to Reactor's global GPU network. We handle WebRTC streaming, session management,
and delivery.

## How it works

<Steps>
  <Step title="Install the CLI">
    Install the `reactor` CLI and you are set. The runtime ships inside the image the CLI builds for you, so nothing else installs on your host.

    ```sh theme={"theme":{"light":"github-light","dark":"github-dark-high-contrast"}}
    curl -fsSL https://reactor.inc/install | bash
    ```
  </Step>

  <Step title="Scaffold a workspace">
    Use the `reactor` CLI to scaffold a Docker-based workspace. The generated `reactor.yaml` declares everything Reactor knows about the model: registration metadata in `model:`, runtime entrypoint in `runtime:`, and the image in `build:`.

    ```bash theme={"theme":{"light":"github-light","dark":"github-dark-high-contrast"}}
    reactor init my-model
    cd my-model
    ```

    ```yaml reactor.yaml theme={"theme":{"light":"github-light","dark":"github-dark-high-contrast"}}
    model:
      name: my-model
      version: v0.0.1

    runtime:
      import: model:MyModel
      config: config.yaml

    build:
      runtime_version: "3.2.5"
    ```
  </Step>

  <Step title="Build your model">
    Subclass `ReactorModel`, load your weights in `load()`, and emit frames from `run()`. The runtime streams them to clients over WebRTC.

    ```python theme={"theme":{"light":"github-light","dark":"github-dark-high-contrast"}}
    class MyModel(ReactorModel):
        async def run(self):
            while True:
                await self.connected.wait()
                while self.connected.is_set():
                    frame = self.pipe.forward(prompt=self.prompt)
                    await self.emit(MyOutput(main_video=frame))
    ```

    Writing the model is documented at [docs.reactor.inc/deploy](https://docs.reactor.inc/deploy/overview).
  </Step>

  <Step title="Test locally">
    `reactor run` builds the workspace image and starts it on port 8080. Connect from the [Reactor Sandbox](https://reactor-sandbox.vercel.app/) in `Local (Direct)` mode to see frames streaming.

    ```bash theme={"theme":{"light":"github-light","dark":"github-dark-high-contrast"}}
    reactor run
    ```
  </Step>

  <Step title="Deploy">
    Run the deploy commands from inside the workspace. The CLI reads the model name and release tag from `reactor.yaml`, so you register once, then publish and deploy each release. Your model is live on production GPUs in under 3 minutes.

    ```bash theme={"theme":{"light":"github-light","dark":"github-dark-high-contrast"}}
    reactor auth login
    reactor model register
    reactor model publish
    reactor model deploy
    ```
  </Step>

  <Step title="Connect clients">
    Use the JavaScript or Python SDK to stream your model's output to any application.

    ```tsx theme={"theme":{"light":"github-light","dark":"github-dark-high-contrast"}}
    <ReactorProvider modelName="my-model" autoConnect={true}>
      <ReactorView className="w-full aspect-video" />
    </ReactorProvider>
    ```
  </Step>
</Steps>

## Why Reactor

<CardGroup cols={2}>
  <Card title="Sub-50ms streaming" icon="signal">
    Frames delivered over WebRTC as they are generated. Client inputs received live.
  </Card>

  <Card title="Stateful sessions" icon="users">
    Your model holds state across a whole session, with hooks for every client that joins or leaves.
  </Card>

  <Card title="Global GPU network" icon="globe">
    Nodes in every major region. A client in Tokyo connects to a GPU in Tokyo.
  </Card>

  <Card title="No transport code" icon="plug">
    You never touch WebRTC, WebSockets, or video encoding. Reactor handles it.
  </Card>

  <Card title="Live in minutes" icon="timer">
    Publish and your model is running on production GPUs in under 3 minutes.
  </Card>

  <Card title="You own your model" icon="shield-check">
    Your weights, your inference logic. Reactor never accesses or trains on your data.
  </Card>
</CardGroup>

## Get started

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/deploy/development/quickstart">
    Install the CLI, scaffold a project, and stream your first frames.
  </Card>

  <Card title="Build a Model" icon="code" href="https://docs.reactor.inc/deploy/development/overview">
    Tracks, the run loop, commands, and messages.
  </Card>

  <Card title="Install the CLI" icon="terminal" href="/deploy/platform/installation">
    Homebrew on macOS, tarballs for Linux and CI.
  </Card>

  <Card title="Deployment" icon="cloud" href="/deploy/platform/deploying">
    Register, publish a release, and go live on Reactor's GPUs.
  </Card>
</CardGroup>
