> ## 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
> To build and serve your own model, start at /deploy/development/quickstart and /deploy/development/overview. Deploying is the default path: reactor init scaffolds a workspace, reactor auth login authenticates, and reactor model deploy registers the model, publishes the release with the weights/ folder, and activates it on Reactor's GPUs, in one command from that workspace. Docker must be running, because the publish step builds the image locally. Bump model.version in reactor.yaml before redeploying a change, because a release that already has an image is reactivated as it is. Deployment access is granted per account, so contact team@reactor.inc if a deploy is refused. Every key in reactor.yaml is documented at /deploy/platform/reactor-yaml. Model code imports reactor_runtime; Python client code imports reactor_sdk. The runtime overview explains the model interface. Running the model on your own machine with reactor run is optional and needs a GPU you attach with --gpus; /deploy/development/local-testing covers that loop and pairs a complete brightness model with a Python client test in a separate brightness-test workspace.
> Reactor hosts multiple models, each with its own connect slug (modelName) and command/event schema. The video model catalog — slug, typed SDK package, and links to its schema — is at /model-api-reference/overview. Robotics policy documentation starts at /robotics/overview; The launch policies are Cosmos Nano DROID (/robotics/cosmos/nano-policy-droid/), DreamZero DROID (/robotics/dreamzero/droid/), and FLUX Action DROID (/robotics/flux-action/droid/), organized by model family and embodiment. 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.

# PixVerse R2 Director prompt guide

> Describe a world once, cast it with reference images, and write each clip as an action that continues the last.

PixVerse R2 Director takes two kinds of text. A **world description** goes into `create_world` once.
It sets the place, the people, the light, and the mood for every clip. A **clip prompt** goes into
`enqueue` for each clip. It says what happens next. Both can be up to 2,000 characters.

The model uses your prompts as written. When you set `enhance_prompt` to true, the model first adds
more detail to the world description, and then creates the world.

## Describe the world once

Write the world as a place you could walk into. Name the location, the people in it, the light, and
the mood. Do not say what happens in the world description.

A cook flips noodles, then serves a customer, then closes the stall and walks home.

A rainy neon market at night. A street cook in her fifties works at a noodle stall under a red
awning. Wet asphalt reflects the signs. Steam and warm lantern light.

Put the actions that happen in the scene into clip prompts instead. The world is the stage, and each
clip is a scene on it.

If you give reference images, the description can be short, or you can leave it out. If you give no
images, the model builds the world from the description alone.

## Choose a style

`style` sets the style of every clip in the world: `Dramatic` (the default), `Ambient`, or `POV`.
`POV` is a first-person view. A world has one style, and you cannot change it. To try a different
style, create a second world.

## Cast the world with reference images

`create_world` takes up to six images of the people, places, and things in the world. The order of
the images matters:

* The first image is the **opening image** of the world. The first clip of every run opens from it.
* Each image gets an index. The indexes start at 0 and follow the upload order. From the second clip
  of a run on, `enqueue` names images by that index in `reference_indexes`, `first_frame_ref`, and
  `last_frame_ref`.

Match the shape of the images to your `aspect_ratio`: wide images for `16:9`, tall images for
`9:16`. Use PNG, JPEG, or WEBP images. Each image can be at most 20 MiB and 40 megapixels.

## Write each clip as an action

A clip prompt says what happens in 5 to 10 seconds: the action, and how the view moves. Write the
events in the order they play. Put one or two actions in each clip.

The cook flips the noodles, serves two customers, cleans the stall, turns off the lights, and walks
away into the rain.

The cook lifts the wok and flips the noodles. Steam rises. Slow push-in toward her hands.

Avoid the word "camera". The model uses the prompt as written, so "the camera pushes in" can put a
camera in the picture. Describe how the view moves instead.

The camera pushes in toward her hands. The camera pans left across the stall.

Slow push-in toward her hands. The view drifts left across the stall.

Set `seconds` to fit the action. A quick action, like a glance, fits in 5 seconds. A slower one,
like a walk down a street, needs up to 10.

## Continue, cut, or move between images

By default, the next clip continues from the last frame of the previous clip, and it draws on every
reference image. From the second clip of a run on, the reference options choose which images a clip
draws on, and which image it opens or ends on:

| You want | Send |
| - | - |
| The next moment of the same shot | No reference options. |
| A clip that draws on some images only | `reference_indexes: [0, 2]` |
| A clip that draws on no reference image | `reference_indexes: []` |
| A cut to a new shot that opens on image 1 | `first_frame_ref: 1` |
| A move from image 0 to image 2 within the clip | `first_frame_ref: 0, last_frame_ref: 2` |

The first clip of a run always opens from the opening image, and it takes none of these options.
The model refuses three mistakes with `invalid_reference`:

* A nonempty `reference_indexes` together with a frame reference.
* An index named twice.
* An index past the number of images in the world.

Some generation workers cannot build a `last_frame_ref`. When the worker that builds your clip
cannot, the clip fails with `unsupported_reference`. Queue the clip again without `last_frame_ref`,
or as a cut with `first_frame_ref` alone.

## Plan a run

A run is a series of clips that continue one another. It starts with the first `enqueue` on a
world. Any one of these ends it:

* You call `end_run`.
* The run has nothing to build for `idle_seconds`.
* The run reaches `max_seconds` (1,800 seconds).
* The session ends.

The next `enqueue` starts a new run. Its first clip opens from the opening image again. It does not
continue from the last frame of the run before.

To stay in one run, keep generating clips while a scene plays. Up to 4 clips can be queued or
generating at once. Up to 8 clips can be ready or building together. Built clips stay `ready` after
their run ends, so you can still play them.

## Common fixes

| Problem | Fix |
| - | - |
| A camera appears in the shot | Remove the word "camera". Describe how the view moves: "slow push-in", "the view drifts left". |
| The first clip ignores `first_frame_ref` | The first clip of a run takes no reference options. Queue it plain, then cut in the second clip. |
| `enqueue` is refused with `invalid_reference` | Check the index against `session_state.reference_images`, and do not mix `reference_indexes` with a frame reference. |
| `enqueue` is refused with `queue_full` | Wait for `clip_generated`, play or `pop` a ready clip, then queue again. |
| A clip fails with `content_policy` | The generation service declined the prompt or an image. Change the wording or the image and queue again. |
| Playback has gaps | Wait until a few clips are `ready`, then turn on autoplay. |
| A new run looks like a fresh start | That is expected. The first clip of a run opens from the opening image. Keep clips queued to stay in one run. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.