> ## 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.

# Replace an environment

> Replaces all of the environment's settings in one atomic write and creates its next
revision. Use it from a client that holds the full desired state, such as a CI job. It has
the rules, status codes, and response of the update, with these differences:

- `image` and `instances` are required. Nothing defaults from the environment or the model.
- An omitted `resources.accelerators` is `[]`, so it moves a GPU environment to CPU.
- `resources` is a full object: an omitted `cpu` or `memory` value is unset.
- `variables` is a full map: an omitted name is removed, and a `null` value is `400`.

As on the update, an omitted `weights` keeps the current pin, and only `null` clears it.




## OpenAPI

````yaml /openapi.yaml put /projects/{proj_id}/environments/{env}
openapi: 3.1.0
info:
  title: Reactor Platform API
  version: '1'
  description: >
    The Reactor Platform API mints session tokens, starts and operates sessions,
    negotiates media

    transport, and manages your account, models, and deployments. Every path is
    relative to

    `https://api.reactor.inc`. See the
    [Introduction](/platform-api/introduction) and

    [Authentication](/platform-api/authentication) pages for credentials,
    versioning, and errors.
  contact:
    name: Reactor support
    url: https://docs.reactor.inc/resources/support
servers:
  - url: https://api.reactor.inc
    description: Production
security:
  - apiKey: []
tags:
  - name: Status
    description: >-
      Public, unauthenticated endpoints for service health, pricing, and the
      values the API accepts.
  - name: Tokens
    description: >
      Exchange a long-lived API key for a short-lived, session-scoped token that
      a client can use

      to create and operate sessions without holding the key.
  - name: Users
    description: >
      Read your own user record, your account's roster, and account memberships,
      and manage

      member roles as an account admin.
  - name: API Keys
    description: >-
      Revoke API keys. Use the [Dashboard](https://reactor.inc/dashboard) to
      list or create keys. The CLI can also create a key with `reactor auth
      login`.
  - name: Sessions
    description: >
      Create, inspect, and end sessions. A session holds one running model for
      one client

      application; media and messages flow over a transport you attach to it
      afterwards.
  - name: Transport
    description: >
      Attach a client to a session. WebRTC signaling carries ICE servers, SDP,
      and ICE candidates;

      a LiveKit room connection lets the session join a room you host.
  - name: Files
    description: >
      Upload files a model reads, either for one running session or ahead of
      time for sessions you

      have not started yet.
  - name: Recordings
    description: >
      Fetch the recorded video of a session as an HLS playlist, during the
      session or after it ends.
  - name: Accounts
    description: >
      Read and manage the account your credential acts in: its name and slug,
      its credit

      balance, its effective quotas, and its accelerator capacity.
  - name: Invitations
    description: >
      Invite people to your account by email, and manage pending invitations.
      The recipient

      accepts from the emailed link while signed in to the dashboard.
  - name: Usage
    description: >
      List the sessions your account has run, filter them by status, date,
      model, or API key,

      and read exact session totals for a date window.
  - name: Models
    description: >
      Register, read, update, and delete the models your account serves, and
      list the models you can

      use. The `reactor model` CLI commands are built on these endpoints.
  - name: Releases
    description: >
      Register a model's versioned releases, push their container image, and
      deploy a release with a

      per-region instance plan.
  - name: Model Weights
    description: >
      Upload and inspect the weights bundle of a release: single-request
      uploads, multipart uploads

      for large files, and the server-side finalize that marks a bundle
      complete.
  - name: Model Schemas
    description: >
      Attach an OpenAPI schema to a release that describes the model's commands,
      messages, and

      tracks. Schemas of public models are readable without credentials.
  - name: Model Access
    description: |
      Share a private model with other accounts, one environment at a time.
  - name: Projects
    description: >
      A project is the deploy identity of a model you serve on Reactor. Each
      model is one

      project, with its own UUID. Creating a project also creates its
      `production` environment.
  - name: Environments
    description: >
      An environment is a named deploy target of a project, such as `production`
      or `staging`.

      Each write to an environment creates its next revision, and the newest
      revision is what the

      environment runs. Environment access grants let another account start
      sessions on one

      environment.
  - name: Revisions
    description: >
      A revision is an immutable, numbered snapshot of one environment: its
      model image, weights,

      resources, instances, and variables. An environment's revisions, newest
      first, are its change

      log.
  - name: Images
    description: >
      Model images are the container images pushed to your model's repository,
      named by digest.

      Experimental: this API can change without notice.
  - name: Weight Sets
    description: >
      A weight set is a version-2 weights bundle, named by its set digest. Push
      the files, then put

      the manifest. Available when weight sets are enabled for your account.
      Experimental: this API

      can change without notice.
  - name: Tags
    description: >
      A tag is a movable name on one model image or one weight set of a project.
      A release of the

      model is a read-only tag. Experimental: this API can change without
      notice.
paths:
  /projects/{proj_id}/environments/{env}:
    parameters:
      - $ref: '#/components/parameters/ProjectProjId'
      - $ref: '#/components/parameters/ProjectEnv'
    put:
      tags:
        - Environments
      summary: Replace an environment
      description: >
        Replaces all of the environment's settings in one atomic write and
        creates its next

        revision. Use it from a client that holds the full desired state, such
        as a CI job. It has

        the rules, status codes, and response of the update, with these
        differences:


        - `image` and `instances` are required. Nothing defaults from the
        environment or the model.

        - An omitted `resources.accelerators` is `[]`, so it moves a GPU
        environment to CPU.

        - `resources` is a full object: an omitted `cpu` or `memory` value is
        unset.

        - `variables` is a full map: an omitted name is removed, and a `null`
        value is `400`.


        As on the update, an omitted `weights` keeps the current pin, and only
        `null` clears it.
      operationId: replaceEnvironment
      parameters:
        - $ref: '#/components/parameters/ProjectIfMatchRevision'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProjectEnvironmentReplace'
            example:
              image:
                tag: v1.4.0
              resources:
                accelerators:
                  - type: NVIDIA_H100
                    count: 1
              instances:
                - count: 2
              variables:
                LOG_LEVEL:
                  value: info
                API_KEY:
                  secret: API_KEY
      responses:
        '200':
          description: The environment after the write.
          headers:
            ETag:
              description: The revision number of the returned environment in quotes.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectEnvironment'
              example:
                id: 4b5c6d7e-8f90-4a1b-8c2d-3e4f5a6b7c8d
                project_id: 0d3c6f4e-8a1b-4c2d-9e7f-1a2b3c4d5e6f
                name: production
                image:
                  tag: v1.4.0
                  digest: >-
                    sha256:9e01aa47c3b2d5f6e7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0
                  ref: null
                weights: null
                resources:
                  accelerators:
                    - type: NVIDIA_H100
                      count: 1
                extra_args: []
                node_selector: null
                instances:
                  - count: 2
                variables:
                  LOG_LEVEL:
                    value: info
                  API_KEY:
                    secret: API_KEY
                    version_id: 018cc820-e222-7ba6-9f43-7cf0b7e3a112
                revision:
                  number: 5
                  created_by:
                    user_id: 9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d
                  created_at: '2026-10-11T08:00:00Z'
                public: false
                created_at: '2026-10-09T08:53:20Z'
                deleted_at: null
        '400':
          $ref: '#/components/responses/ProjectEnvironmentWriteBadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/ProjectEnvironmentWriteForbidden'
        '404':
          $ref: '#/components/responses/ProjectEnvironmentWriteNotFound'
        '409':
          $ref: '#/components/responses/ProjectEnvironmentWriteConflict'
        '412':
          $ref: '#/components/responses/ProjectEtagMismatch'
        '429':
          $ref: '#/components/responses/ProjectEnvironmentWriteQuota'
        '503':
          $ref: '#/components/responses/ProjectEnvironmentWriteUnavailable'
components:
  parameters:
    ProjectProjId:
      name: proj_id
      in: path
      required: true
      description: The project's ID, a UUID. It is not the model's ID.
      schema:
        type: string
        format: uuid
    ProjectEnv:
      name: env
      in: path
      required: true
      description: >-
        The environment's ID (a UUID) or its name, such as `production`. A name
        matches only a live environment; a deleted environment is reachable by
        its ID only.
      schema:
        type: string
    ProjectIfMatchRevision:
      name: If-Match
      in: header
      required: false
      description: >-
        The `ETag` of your last read, a revision number in quotes. If the
        environment's newest revision differs, the write is `412 etag_mismatch`
        and nothing is written. A weak tag, a list, or `*` is `400`.
      schema:
        type: string
        example: '"3"'
  schemas:
    ProjectEnvironmentReplace:
      type: object
      required:
        - image
        - instances
      additionalProperties: false
      description: >-
        The full desired settings. Read-only fields are accepted only with their
        current values.
      properties:
        image:
          $ref: '#/components/schemas/ProjectImageInput'
        weights:
          type:
            - string
            - 'null'
          description: As on the update. Omitted keeps the current pin; `null` clears it.
        resources:
          allOf:
            - $ref: '#/components/schemas/ProjectResources'
          description: >-
            A full object. An omitted `accelerators` is `[]` (CPU); an omitted
            `cpu` or `memory` value is unset.
        extra_args:
          type: array
          items:
            type: string
        instances:
          type: array
          items:
            $ref: '#/components/schemas/ProjectInstance'
        variables:
          allOf:
            - $ref: '#/components/schemas/ProjectVariables'
          description: The full map. An omitted name is removed.
        deployment_strategy:
          type: string
          enum:
            - ROLLING
            - REPLACE_ALL
          default: ROLLING
        interrupt_sessions:
          type: boolean
          default: false
    ProjectEnvironment:
      type: object
      required:
        - id
        - project_id
        - name
        - image
        - weights
        - resources
        - extra_args
        - node_selector
        - instances
        - revision
        - public
        - created_at
        - deleted_at
      properties:
        id:
          type: string
          format: uuid
          description: >-
            The environment's ID. It is neither the project's nor the model's
            ID.
        project_id:
          type: string
          format: uuid
        name:
          type: string
        image:
          oneOf:
            - $ref: '#/components/schemas/ProjectImageRef'
            - type: 'null'
          description: >-
            The current image. For `production`, the deployed release's image.
            Null for another environment before its first revision.
        weights:
          oneOf:
            - $ref: '#/components/schemas/ProjectWeightsRef'
            - type: 'null'
          description: The pinned weights. Null when none are pinned.
        resources:
          $ref: '#/components/schemas/ProjectResources'
        extra_args:
          type: array
          items:
            type: string
          description: Extra arguments passed to the model container.
        node_selector:
          type:
            - string
            - 'null'
          description: Read-only.
        instances:
          type: array
          items:
            $ref: '#/components/schemas/ProjectInstance'
        variables:
          $ref: '#/components/schemas/ProjectVariables'
        revision:
          $ref: '#/components/schemas/ProjectRevisionRef'
        public:
          type: boolean
          description: >-
            When true, any authenticated caller can open sessions on
            `production`. It grants no read. Read-only for customers.
        created_at:
          type: string
          format: date-time
        deleted_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            When the environment was deleted. A deleted environment takes no
            writes.
    ProjectImageInput:
      type: object
      description: >
        The image to run. Send `tag`, `ref`, both (they must name the same
        image), or `digest`

        alone. A `tag` is a model image tag, or a release of the model; a tag
        wins over a release

        of the same name. A 12 to 64 character lowercase hex `tag` that no tag
        has names the image

        whose digest it starts. A `digest` is `sha256:<64 hex>` or a 12+
        character hex prefix. A

        `ref`, a `digest`, or such a hex `tag` runs the image with no release.
      properties:
        tag:
          type: string
          example: v1.3.0
        ref:
          type: string
          description: A digest reference, `…@sha256:<64 hex>`, to an image of the project.
        digest:
          type: string
          example: >-
            sha256:d138642b1cd5ea5bba6ed5655fa1d7dfced33889d149b094b2c32c32f09ed3da
    ProjectResources:
      type: object
      description: What each instance gets.
      properties:
        accelerators:
          type:
            - array
            - 'null'
          maxItems: 4
          items:
            $ref: '#/components/schemas/ProjectAccelerator'
          description: >
            The accelerator configurations, in preference order, with no
            repeats. `[]` is CPU. A

            list longer than one is not allowed on `production`. Null on a GPU
            model that has no

            stored GPU type, until a write sets it.
        cpu:
          $ref: '#/components/schemas/ProjectQuantities'
        memory:
          $ref: '#/components/schemas/ProjectQuantities'
    ProjectInstance:
      type: object
      required:
        - count
      description: >
        One entry of the instances declaration, in one of two forms. **Per
        region**: each entry

        names `count` instances in the one region of `regions.only`, totalling
        at most 1000.

        **Total**: exactly one entry with the total `count` (at most 1000),
        placed by Reactor;

        `regions.prefer` names regions to fill first, `regions.only` restricts
        placement. A list

        replaces the current one: an omitted region scales to zero, and `[]`
        scales everything to

        zero.
      properties:
        count:
          type: integer
          minimum: 0
        regions:
          type: object
          properties:
            only:
              type: array
              items:
                type: string
              description: The only regions to use.
            prefer:
              type: array
              items:
                type: string
              description: >-
                Regions to fill first, in order. Total form only, and not with
                `only`.
    ProjectVariables:
      type: object
      description: >
        Variables keyed by name. Names use letters, digits, `_`, `-`, and `.`,
        with no leading

        digit. Reserved names such as `MODEL_NAME` and any `REACTOR_` name are
        refused.
      additionalProperties:
        $ref: '#/components/schemas/ProjectVariable'
    ProjectImageRef:
      type: object
      description: The model image an environment or revision runs.
      properties:
        tag:
          type:
            - string
            - 'null'
          description: >-
            The release the revision carries. Null when it runs an image with no
            release.
        digest:
          type:
            - string
            - 'null'
          description: The image digest, `sha256:<64 hex>`.
        ref:
          type:
            - string
            - 'null'
          description: Always null for customer callers.
    ProjectWeightsRef:
      type: object
      description: The weights an environment or revision pins.
      properties:
        tag:
          type:
            - string
            - 'null'
          description: >-
            The release that named the weights. Null when a write named a digest
            or a tag.
        ref:
          type:
            - string
            - 'null'
          description: A pinned `hf://owner/repo@<commit>` reference, or null.
        digest:
          type:
            - string
            - 'null'
          description: >-
            The set digest, `sha256:<64 hex>`. Null for a version-1 bundle or a
            bare `hf://` reference.
    ProjectRevisionRef:
      type:
        - object
        - 'null'
      description: The current revision. Null before the first revision.
      properties:
        number:
          type: integer
        created_by:
          $ref: '#/components/schemas/ProjectCreatedBy'
        created_at:
          type: string
          format: date-time
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: >-
            A stable error code (for example `not_found`) on newer routes, or a
            sentence on older ones. When `message` is present, branch on
            `error`.
        message:
          type: string
          description: >-
            A human-readable explanation. Do not parse it; its wording may
            change.
        resource:
          type: string
          description: The type of the resource a `not_found` refers to.
        reason:
          type: string
          description: >-
            A more specific cause for `failed_precondition`, `aborted`, and some
            `invalid_request` errors.
    ProjectIncompleteError:
      allOf:
        - $ref: '#/components/schemas/Error'
        - type: object
          properties:
            missing_fields:
              type: array
              items:
                type: string
              description: >-
                For `environment_incomplete`, each missing setting by its path,
                such as `image` or `resources.accelerators`.
    ProjectQuotaError:
      allOf:
        - $ref: '#/components/schemas/Error'
        - type: object
          properties:
            quota_type:
              type: string
              description: The quota that was hit, such as `registry_reads`.
            limit:
              type: string
              description: The limit, as written.
            current:
              type: string
              description: The requested or current value, as written.
            field:
              type: string
              description: >-
                The request member over the limit, such as
                `resources.cpu.limit`.
    ProjectAccelerator:
      type: object
      required:
        - type
        - count
      properties:
        type:
          type: string
          description: A GPU type, as listed by `GET /gpu_types`.
          example: NVIDIA_H100
        count:
          type: integer
          minimum: 1
          description: GPUs per instance. A time-sliced type takes 1 only.
    ProjectQuantities:
      type: object
      properties:
        request:
          type:
            - string
            - 'null'
          description: >-
            A Kubernetes quantity, such as `2` or `16Gi`. `null` clears it on a
            write.
        limit:
          type:
            - string
            - 'null'
          description: A Kubernetes quantity. A request above its limit is `400`.
    ProjectVariable:
      type: object
      description: >
        One environment variable: `{"value": "..."}` for a plain value, or

        `{"secret": "<name>"}` for a secret binding. A read adds the pinned
        `version_id`. A secret

        value never appears here.
      properties:
        value:
          type: string
          description: A plain value.
        secret:
          type: string
          description: The name of a secret to bind. A write pins its latest version.
        version_id:
          type: string
          format: uuid
          description: The pinned secret version. Send it back unchanged to keep the pin.
    ProjectCreatedBy:
      type:
        - object
        - 'null'
      description: >-
        The user who made the write. An API-key write records the key's owner.
        Null for a system write.
      properties:
        user_id:
          type: string
          format: uuid
  responses:
    ProjectEnvironmentWriteBadRequest:
      description: >
        `invalid_request`: a malformed body, an unknown or read-only field with
        a new value, a

        rule of a setting broken, or an `If-Match` that is not one quoted
        revision number. The

        message names the field. With `reason` `invalid_id`, `proj_id` is not a
        UUID.

        `invalid_deployment_plan`: a region of a per-region `instances` entry is
        unknown.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: The credential is missing, invalid, or expired.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ProjectEnvironmentWriteForbidden:
      description: >
        The caller lacks the `account_admin` or `developer` role, Serve access
        is not enabled for

        the account, the project does not exist or belongs to another account,
        or the body changes

        a setting reserved to Reactor (`node_selector`, `public`).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ProjectEnvironmentWriteNotFound:
      description: >
        `not_found`. `resource` names what is missing: `environment`; `image` or
        `release` for an

        `image` that names nothing in the project; `weights` for a `weights`
        value that names no

        weight set; `secret` for a binding to a secret that does not exist.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ProjectEnvironmentWriteConflict:
      description: >
        Nothing was written. `failed_precondition`, with one of these `reason`
        values:

        - `deleted`: the environment is deleted.

        - `environment_incomplete`: the result has no `image`, `instances`, or
        `resources.accelerators`. `missing_fields` lists them.

        - `tag_has_no_image`: the release has no published image.

        - `release_not_semver`: the release's tag is not a semver version.

        - `release_required`: this model's `production` needs a release name in
        `image.tag`.

        - `weights_pin_unavailable`: this model's `production` cannot pin a
        weight set yet. Name a release that holds the set.

        - `weights_need_release`: the revision would keep weights with no set
        digest. Send `weights`, or name a release.

        - `set_objects_off`: `weights` needs weight sets, which are not enabled
        for your account.

        - `plain_variables_too_large`: plain variable values exceed 32 KiB.

        - `resolved_environment_too_large`: plain and secret values together
        exceed 256 KiB.

        - `deployment_plan_unplaceable`: a region cannot hold its instances on
        the listed accelerators.


        Also `accelerator_not_supported_in_region` (no cluster in a planned
        region runs a listed

        type), `accelerator_quota_exceeded` (the plan exceeds the account's
        quota in a region),

        `weights_bundle_unverifiable`, and `aborted` with `reason`
        `concurrent_update` (another

        write landed first; retry).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ProjectIncompleteError'
          example:
            error: failed_precondition
            reason: environment_incomplete
            message: 'environment staging is not complete: set image'
            missing_fields:
              - image
    ProjectEtagMismatch:
      description: >-
        `etag_mismatch`: `If-Match` names a revision that is not the newest one.
        Nothing was written. Read the environment again, then decide.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: etag_mismatch
            message: environment staging is at revision 4, not 3
    ProjectEnvironmentWriteQuota:
      description: >
        `quota_exceeded`. Either the revision's CPU or memory is above the
        account's limit

        (`field` names the request member; no `Retry-After`), or `image` names
        an unrecorded

        digest and the account is over its registry read limit (retry after
        `Retry-After`).
      headers:
        Retry-After:
          schema:
            type: integer
          description: Seconds to wait for the registry read limit only.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ProjectQuotaError'
    ProjectEnvironmentWriteUnavailable:
      description: >
        `unavailable` or `accelerator_inventory_unavailable`: a dependency could
        not be read, or

        live sessions could not be ended for `interrupt_sessions`. Nothing was
        written; retry.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >-
        A Reactor API key (`rk_...`), sent as `Authorization: Bearer rk_...`.
        Keep it on a server.

````

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