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

# Assign a project to a billing warm slot

> Pins a project, at a VM size, to the org's warm slot at slotIndex and returns the slot, provisioning while the project's warm machines are built.

Use this tool when you need to:
- Keep a project's machines warm so its tasks start without waiting for a build
- Move a warm slot to another project or another VM size
- Claim a free slot without evicting another pin (if_unassigned)

Examples:
- PUT /orgs/{orgID}/billing/slots/0 {"project_id": "6f1c2a9e-3b7d-4c55-9a2e-0d8b1f4e7c21", "vm_size": "medium"}
- PUT /orgs/{orgID}/billing/slots/1 {"project_id": "6f1c2a9e-3b7d-4c55-9a2e-0d8b1f4e7c21", "vm_size": "medium", "if_unassigned": true}

Hints:
- orgID is the org's uuid and slotIndex the slot's index, an integer from 0 to 2147483647. project_id (a uuid) and vm_size (medium, large or xl) are required, if_unassigned is optional and defaults to false; the schema answers 422 for a path or body out of that shape, an unknown field included.
- Without if_unassigned the pin replaces whatever project held the slot; with it, the slot is taken only when it holds no project, an auto-assigned project, or this project at this VM size. Either way the slot becomes a manual pin, an auto-assigned slot of the same project at another index is freed, and the project's warm build is queued again, so assigning again retries a failed seed.
- Answers 200 with the BillingWarmSlot, status provisioning and assignment_kind manual; listBillingWarmSlots shows its live status.
- Refused with 404 for a project the org does not hold or that is archived, 400 for a project without a linked GitHub repository, 403 with code forbidden for a slotIndex at or past the org's warm_slot_limit, and 409 warm_slot_occupied, with if_unassigned, when the slot holds another project's pin or this project's pin at another VM size. The handler's 400 for a VM size warm slots cannot pool answers no size the schema admits: medium, large and xl are all pool-eligible.
- Use releaseBillingWarmSlot instead to empty a slot, and getBillingSubscription for warm_slot_limit.
- Owners, admins and billing members only, with a session or a platform API key: a member or viewer is refused with 403 org_role_insufficient before the path or body is validated, a non-member with 403 org_membership_required, an orgID that is not a uuid with 400, and an agent host's grant with 403 agent_host_route_not_allowed.



## OpenAPI

````yaml api-reference/openapi.json PUT /orgs/{orgID}/billing/slots/{slotIndex}
openapi: 3.1.0
info:
  title: Aether API
  version: 0.1.0
servers:
  - url: https://api.runaether.dev
security:
  - bearerAuth: []
paths:
  /orgs/{orgID}/billing/slots/{slotIndex}:
    put:
      tags:
        - billing
      summary: Assign a project to a billing warm slot
      description: >-
        Pins a project, at a VM size, to the org's warm slot at slotIndex and
        returns the slot, provisioning while the project's warm machines are
        built.


        Use this tool when you need to:

        - Keep a project's machines warm so its tasks start without waiting for
        a build

        - Move a warm slot to another project or another VM size

        - Claim a free slot without evicting another pin (if_unassigned)


        Examples:

        - PUT /orgs/{orgID}/billing/slots/0 {"project_id":
        "6f1c2a9e-3b7d-4c55-9a2e-0d8b1f4e7c21", "vm_size": "medium"}

        - PUT /orgs/{orgID}/billing/slots/1 {"project_id":
        "6f1c2a9e-3b7d-4c55-9a2e-0d8b1f4e7c21", "vm_size": "medium",
        "if_unassigned": true}


        Hints:

        - orgID is the org's uuid and slotIndex the slot's index, an integer
        from 0 to 2147483647. project_id (a uuid) and vm_size (medium, large or
        xl) are required, if_unassigned is optional and defaults to false; the
        schema answers 422 for a path or body out of that shape, an unknown
        field included.

        - Without if_unassigned the pin replaces whatever project held the slot;
        with it, the slot is taken only when it holds no project, an
        auto-assigned project, or this project at this VM size. Either way the
        slot becomes a manual pin, an auto-assigned slot of the same project at
        another index is freed, and the project's warm build is queued again, so
        assigning again retries a failed seed.

        - Answers 200 with the BillingWarmSlot, status provisioning and
        assignment_kind manual; listBillingWarmSlots shows its live status.

        - Refused with 404 for a project the org does not hold or that is
        archived, 400 for a project without a linked GitHub repository, 403 with
        code forbidden for a slotIndex at or past the org's warm_slot_limit, and
        409 warm_slot_occupied, with if_unassigned, when the slot holds another
        project's pin or this project's pin at another VM size. The handler's
        400 for a VM size warm slots cannot pool answers no size the schema
        admits: medium, large and xl are all pool-eligible.

        - Use releaseBillingWarmSlot instead to empty a slot, and
        getBillingSubscription for warm_slot_limit.

        - Owners, admins and billing members only, with a session or a platform
        API key: a member or viewer is refused with 403 org_role_insufficient
        before the path or body is validated, a non-member with 403
        org_membership_required, an orgID that is not a uuid with 400, and an
        agent host's grant with 403 agent_host_route_not_allowed.
      operationId: assignBillingWarmSlot
      parameters:
        - in: path
          name: orgID
          required: true
          schema:
            format: uuid
            type: string
        - description: The slot's place in the org's grid, from 0.
          in: path
          name: slotIndex
          required: true
          schema:
            description: The slot's place in the org's grid, from 0.
            format: int64
            maximum: 2147483647
            minimum: 0
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssignBillingWarmSlotRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingWarmSlot'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingErrorResponse'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/BillingErrorResponse'
                  - $ref: '#/components/schemas/OrgAuthorizationErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingErrorResponse'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssignBillingWarmSlotConflictResponse'
          description: Conflict
        '410':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingErrorResponse'
          description: Gone
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingErrorResponse'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingErrorResponse'
          description: Internal Server Error
components:
  schemas:
    AssignBillingWarmSlotRequest:
      additionalProperties: false
      properties:
        if_unassigned:
          description: >-
            Claim the slot only when it holds no project, an auto-assigned
            project, or this project at this VM size; any other pin is refused
            with 409 warm_slot_occupied instead of being evicted or resized.
          type: boolean
        project_id:
          format: uuid
          type: string
        vm_size:
          enum:
            - medium
            - large
            - xl
          type: string
      required:
        - project_id
        - vm_size
      type: object
    BillingWarmSlot:
      description: >-
        One slot of the org's warm slot grid: unassigned, or held by a project
        and in the status that project's warm machines are in.
      discriminator:
        mapping:
          dormant: '#/components/schemas/BillingWarmSlotDormant'
          provisioning: '#/components/schemas/BillingWarmSlotProvisioning'
          ready: '#/components/schemas/BillingWarmSlotReady'
          stale: '#/components/schemas/BillingWarmSlotStale'
          unassigned: '#/components/schemas/BillingWarmSlotUnassigned'
        propertyName: status
      oneOf:
        - $ref: '#/components/schemas/BillingWarmSlotUnassigned'
        - $ref: '#/components/schemas/BillingWarmSlotProvisioning'
        - $ref: '#/components/schemas/BillingWarmSlotReady'
        - $ref: '#/components/schemas/BillingWarmSlotStale'
        - $ref: '#/components/schemas/BillingWarmSlotDormant'
    BillingErrorResponse:
      additionalProperties: false
      properties:
        code:
          enum:
            - bad_gateway
            - bad_request
            - checkout_pending
            - cli_upgrade_required
            - client_outdated
            - conflict
            - enterprise_invoice
            - forbidden
            - free_tier
            - gateway_timeout
            - gone
            - internal_error
            - invalid_surface
            - managed_elsewhere
            - method_not_allowed
            - no_billing_history
            - not_acceptable
            - not_found
            - not_implemented
            - payment_delinquent
            - payment_required
            - personal_org_requires_personal_plan
            - precondition_failed
            - provider_unavailable
            - rate_limited
            - request_canceled
            - request_timeout
            - request_too_large
            - requires_org_admin
            - service_unavailable
            - subscription_active
            - subscription_pending
            - team_org_requires_team_plan
            - team_plan_web_only
            - team_seats_via_membership
            - unauthenticated
            - unsupported_media_type
            - validation_failed
            - warm_slot_occupied
            - web_only
          minLength: 1
          type: string
        error:
          minLength: 1
          type: string
        errors:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
      required:
        - error
        - code
      type: object
    OrgAuthorizationErrorResponse:
      additionalProperties: false
      properties:
        code:
          enum:
            - org_membership_required
            - org_role_insufficient
            - org_suspended
            - account_deleting
            - agent_host_route_not_allowed
            - credential_kind_not_admitted
            - grant_scope_insufficient
          type: string
        error:
          minLength: 1
          type: string
      required:
        - error
        - code
      type: object
    AssignBillingWarmSlotConflictResponse:
      additionalProperties: false
      properties:
        code:
          enum:
            - warm_slot_occupied
          type: string
        error:
          minLength: 1
          type: string
      required:
        - error
        - code
      type: object
    BillingWarmSlotDormant:
      additionalProperties: false
      description: >-
        A slot whose project was neither assigned nor used within the dormancy
        window, so it is not kept warm.
      properties:
        assignment_kind:
          description: >-
            Who holds the slot: manual is a user pin; auto is the auto-fill,
            which keeps the slots an org has not pinned on its most recently
            active projects.
          enum:
            - manual
            - auto
          type: string
        project_id:
          format: uuid
          type: string
        slot_index:
          description: >-
            The slot's place in the org's grid, from 0; the key both writes
            take.
          format: int32
          maximum: 2147483647
          minimum: 0
          type: integer
        status:
          enum:
            - dormant
          type: string
        vm_size:
          enum:
            - medium
            - large
            - xl
          type: string
      required:
        - assignment_kind
        - project_id
        - slot_index
        - status
        - vm_size
      type: object
    BillingWarmSlotProvisioning:
      additionalProperties: false
      description: A slot whose project's warm machines are still being built.
      properties:
        assignment_kind:
          description: >-
            Who holds the slot: manual is a user pin; auto is the auto-fill,
            which keeps the slots an org has not pinned on its most recently
            active projects.
          enum:
            - manual
            - auto
          type: string
        project_id:
          format: uuid
          type: string
        slot_index:
          description: >-
            The slot's place in the org's grid, from 0; the key both writes
            take.
          format: int32
          maximum: 2147483647
          minimum: 0
          type: integer
        status:
          enum:
            - provisioning
          type: string
        vm_size:
          enum:
            - medium
            - large
            - xl
          type: string
      required:
        - assignment_kind
        - project_id
        - slot_index
        - status
        - vm_size
      type: object
    BillingWarmSlotReady:
      additionalProperties: false
      description: A slot with a warm machine from its project's current seed.
      properties:
        assignment_kind:
          description: >-
            Who holds the slot: manual is a user pin; auto is the auto-fill,
            which keeps the slots an org has not pinned on its most recently
            active projects.
          enum:
            - manual
            - auto
          type: string
        last_synced_at:
          description: When the warm machine's seed was built; null when unknown.
          format: date-time
          type:
            - string
            - 'null'
        project_id:
          format: uuid
          type: string
        slot_index:
          description: >-
            The slot's place in the org's grid, from 0; the key both writes
            take.
          format: int32
          maximum: 2147483647
          minimum: 0
          type: integer
        status:
          enum:
            - ready
          type: string
        vm_size:
          enum:
            - medium
            - large
            - xl
          type: string
      required:
        - assignment_kind
        - last_synced_at
        - project_id
        - slot_index
        - status
        - vm_size
      type: object
    BillingWarmSlotStale:
      additionalProperties: false
      description: A slot whose project's latest seed failed.
      properties:
        assignment_kind:
          description: >-
            Who holds the slot: manual is a user pin; auto is the auto-fill,
            which keeps the slots an org has not pinned on its most recently
            active projects.
          enum:
            - manual
            - auto
          type: string
        failure_reason:
          description: Why the project's latest seed failed; null when it named no reason.
          minLength: 1
          type:
            - string
            - 'null'
        project_id:
          format: uuid
          type: string
        slot_index:
          description: >-
            The slot's place in the org's grid, from 0; the key both writes
            take.
          format: int32
          maximum: 2147483647
          minimum: 0
          type: integer
        status:
          enum:
            - stale
          type: string
        vm_size:
          enum:
            - medium
            - large
            - xl
          type: string
      required:
        - assignment_kind
        - failure_reason
        - project_id
        - slot_index
        - status
        - vm_size
      type: object
    BillingWarmSlotUnassigned:
      additionalProperties: false
      description: A slot no project holds.
      properties:
        slot_index:
          description: >-
            The slot's place in the org's grid, from 0; the key both writes
            take.
          format: int32
          maximum: 2147483647
          minimum: 0
          type: integer
        status:
          enum:
            - unassigned
          type: string
      required:
        - slot_index
        - status
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      scheme: bearer
      type: http

````

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