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

# Retrieve a Sailbox

> Returns one Sailbox, including its latest observed resource usage.



## OpenAPI

````yaml /sailbox-openapi.json get /sailboxes/{sailbox_id}
openapi: 3.1.0
info:
  title: Sail Sailbox API
  version: '2026-08-26'
  description: >-
    Create and operate Sailboxes over HTTP. Sailboxes are fast-booting virtual
    machines that you can pause, resume, and checkpoint.


    Run commands, stream files, manage lifecycle and networking, and inspect
    usage. Turning on SSH and building an image still require an SDK or the CLI.
    See the [HTTP API guide](/sailboxes-http-api).
servers:
  - url: https://sailbox-api.sailresearch.com/v1
security:
  - BearerAuth: []
tags:
  - name: Apps
    description: Groups that own Sailboxes. One app per workload.
  - name: Lifecycle
    description: >-
      A Sailbox's whole life: create it, watch it, stop and start it, terminate
      it.
  - name: Checkpoints
    description: Save a Sailbox to start from later, and copy a running one.
  - name: Exec
    description: Run commands and control their standard input and terminals.
  - name: Files
    description: Stream regular files into and out of a Sailbox.
  - name: Networking
    description: >-
      Publish ports, serve them on hostnames you own, and identify a Sailbox to
      other Sailboxes.
  - name: Secrets
    description: >-
      Organization values that HTTP policies can add to matching requests. Sail
      never returns a stored value.
  - name: HTTP policies
    description: Rules for HTTPS requests a Sailbox sends.
  - name: Volumes
    description: >-
      Shared storage that outlives any one Sailbox. Alpha: these endpoints can
      still change.
  - name: SSH access
    description: Certificates for connecting to a Sailbox with `ssh`.
  - name: Usage
    description: Resource usage and spend.
  - name: Identity
    description: Who your API key belongs to.
paths:
  /sailboxes/{sailbox_id}:
    get:
      tags:
        - Lifecycle
      summary: Retrieve a Sailbox
      description: Returns one Sailbox, including its latest observed resource usage.
      operationId: getSailbox
      parameters:
        - $ref: '#/components/parameters/SailboxId'
      responses:
        '200':
          description: The Sailbox.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Sailbox'
        '400':
          description: >-
            The request was rejected. See the error message for the offending
            field.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  message: memory_limit_gib for size m must be between 8 and 128
                  type: invalid_request_error
                  param: null
                  code: null
        '401':
          description: The API key is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  message: Invalid API key
                  type: authentication_error
                  param: null
                  code: invalid_api_key
        '402':
          description: >-
            The organization is out of credits. The error carries a
            `billing_url` pointing at the page where you add them. Retry once
            you have.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  message: >-
                    Your API key has been disabled due to insufficient credits.
                    Visit https://app.sailresearch.com/billing to add credits.
                  type: billing_error
                  param: null
                  code: credits_exhausted
                  billing_url: https://app.sailresearch.com/billing
        '403':
          description: The API key is not allowed to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  message: sailboxes require an organization-scoped API key
                  type: permission_error
                  param: null
                  code: null
        '404':
          description: No Sailbox with that id exists in your organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  message: sailbox "sb_9c8f1e2a-3b4d-4f5a-8c7e-1d2f3a4b5c6d" not found
                  type: not_found_error
                  param: null
                  code: null
        '429':
          description: >-
            For its first ten minutes a new organization is capped on how many
            requests it can have in flight at once, and yours is over that cap.
            The request never started, so retry it unchanged after the delay in
            the `Retry-After` header. The limit clears as those requests finish.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  message: >-
                    Too many concurrent requests. Please retry after some of
                    your organization's in-flight requests complete.
                  type: rate_limit_error
                  param: null
                  code: rate_limited
          headers:
            Retry-After:
              $ref: '#/components/headers/RetryAfter'
        '500':
          description: Server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  message: failed to fetch sailbox
                  type: server_error
                  param: null
                  code: null
        '503':
          description: >-
            Sail is momentarily unavailable. Retry after the delay in the
            `Retry-After` header when one is present, and with backoff
            otherwise.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  message: Authentication service unavailable
                  type: server_error
                  param: null
                  code: null
          headers:
            Retry-After:
              $ref: '#/components/headers/RetryAfter'
components:
  parameters:
    SailboxId:
      name: sailbox_id
      in: path
      required: true
      schema:
        type: string
      description: >-
        Id of the Sailbox, as returned by create. It is `sb_` followed by a
        UUID.
  schemas:
    Sailbox:
      type: object
      description: >-
        A Sailbox and its latest observed resource usage. The `can_` flags are
        hints for deciding which actions are worth offering. They are all false
        on a private Sailbox you did not create, even where
        `X-Sail-Owner-Override-Reason` would still let you act.
      properties:
        sailbox_id:
          type: string
          description: Unique id of the Sailbox.
        name:
          type: string
          description: >-
            The Sailbox's display name: the one you gave at create or restore
            time, or one derived from the source when you left it out.
        app_id:
          type: string
          description: Id of the app the Sailbox belongs to.
        app_name:
          type: string
          description: Name of the app the Sailbox belongs to.
        image_id:
          type: string
          description: >-
            Id of the built image the Sailbox boots from. Two Sailboxes created
            from the same `image` share this id.
        status:
          type: string
          description: >-
            Current state of the Sailbox. Values in use today are `creating`,
            `running`, `paused`, `sleeping`, `terminating`, `terminated`,
            `failed`, `create_failed`, `interrupted_restorable`, and
            `interrupted_unsafe_to_retry`. New values can appear over time, so
            treat this as an open set.
        architecture:
          type: string
          description: CPU architecture the Sailbox runs on.
        vcpu_count:
          type: integer
          description: Virtual CPUs allocated to the Sailbox.
        memory_mib:
          type: integer
          description: Memory limit in MiB.
        state_disk_size_gib:
          type: integer
          description: Disk limit in GiB.
        volume_mounts:
          type: array
          items:
            $ref: '#/components/schemas/SailboxVolumeMount'
          description: >-
            Volumes attached to this Sailbox and the paths they are mounted at.
            Empty when the Sailbox has none.
        cpu_used_vcpu:
          type: number
          description: >-
            Virtual CPUs in use in the most recent sample. `0` when there is no
            recent sample.
        memory_used_bytes:
          type: integer
          description: >-
            Memory in use in the most recent sample. `0` when there is no recent
            sample.
          format: int64
        disk_used_bytes:
          type: integer
          description: >-
            Disk in use in the most recent sample. `0` when there is no recent
            sample.
          format: int64
        error_message:
          oneOf:
            - type: string
            - type: 'null'
          description: Why the Sailbox failed, when it failed.
        deprecation:
          oneOf:
            - $ref: '#/components/schemas/SailboxDeprecation'
            - type: 'null'
          description: >-
            Upgrade notice when this Sailbox has a deadline to act on and your
            credential can act on it. `null` otherwise, which is the usual case.
        guest_schema_version:
          oneOf:
            - type: integer
              format: int64
            - type: 'null'
          description: >-
            Version of the Sail runtime inside the Sailbox. `null` when the
            version is not known.
        created_by_user_id:
          oneOf:
            - type: string
            - type: 'null'
          description: >-
            User whose key created the Sailbox. `null` when a service key
            created it.
        visibility:
          oneOf:
            - type: string
            - type: 'null'
          description: >-
            `private` means only the creator can operate the Sailbox, apart from
            the operations an organization admin can take with
            `X-Sail-Owner-Override-Reason`. `org` or `null` means anyone in the
            organization can operate it.
        auto_sleep:
          $ref: '#/components/schemas/AutoSleep'
          description: >-
            The Sailbox's automatic-sleep preference. Set it at create time or
            with `POST /sailboxes/{sailbox_id}/auto_sleep`.
          required:
            - automatic
        network_policy:
          $ref: '#/components/schemas/NetworkPolicyInfo'
          description: >-
            The Sailbox's network policy, frozen at creation. Absent means
            public (unrestricted outbound access). Present carries the
            restrictive mode so you can verify what is enforced, including on a
            Sailbox created from a checkpoint.
        started_at:
          oneOf:
            - type: string
              format: date-time
            - type: 'null'
          description: >-
            When the Sailbox first started running. It is not rewritten when a
            Sailbox resumes.
        last_checkpointed_at:
          oneOf:
            - type: string
              format: date-time
            - type: 'null'
          description: When the Sailbox last saved its state.
        checkpoint_generation:
          type: integer
          description: >-
            Checkpoint counter for the Sailbox. It goes up by one every time the
            Sailbox saves its state, which includes pausing and sleeping.
            Compare it across two reads to tell whether the Sailbox saved again
            in between.
          format: int64
        created_at:
          type: string
          format: date-time
          description: When the Sailbox was created.
        updated_at:
          type: string
          format: date-time
          description: When the Sailbox last changed.
        can_pause:
          type: boolean
          description: >-
            Whether pausing would change this Sailbox now. False once it is
            paused.
        can_sleep:
          type: boolean
          description: >-
            Whether sleeping would change this Sailbox now. False once it is
            asleep.
        can_resume:
          type: boolean
          description: >-
            Whether resuming would change this Sailbox now. False once it is
            running.
        can_terminate:
          type: boolean
          description: >-
            Whether terminating would change this Sailbox now. False once it is
            shutting down or gone.
      required:
        - sailbox_id
        - name
        - app_id
        - app_name
        - image_id
        - status
        - architecture
        - vcpu_count
        - memory_mib
        - state_disk_size_gib
        - volume_mounts
        - cpu_used_vcpu
        - memory_used_bytes
        - disk_used_bytes
        - error_message
        - deprecation
        - guest_schema_version
        - created_by_user_id
        - visibility
        - auto_sleep
        - started_at
        - last_checkpointed_at
        - checkpoint_generation
        - created_at
        - updated_at
        - can_pause
        - can_sleep
        - can_resume
        - can_terminate
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/ErrorObject'
    SailboxVolumeMount:
      type: object
      properties:
        volume_id:
          type: string
          description: Id of the mounted volume.
        mount_path:
          type: string
          description: Absolute path inside the Sailbox where the volume is mounted.
      required:
        - volume_id
        - mount_path
    SailboxDeprecation:
      type: object
      description: >-
        Set when the Sailbox runs an outdated runtime and you can upgrade it
        now. `null` when there is nothing to act on, including when an upgrade
        is already under way or your key cannot operate this Sailbox.
      properties:
        deadline:
          type: string
          description: >-
            Date after which the Sailbox may be restarted automatically to
            upgrade it.
          examples:
            - '2026-09-01'
        message:
          type: string
          description: Explanation you can show to whoever owns the Sailbox.
      required:
        - deadline
        - message
    AutoSleep:
      type: object
      description: >-
        A Sailbox's automatic-sleep preference, in both directions: send it to
        choose, and read it back to see the choice in effect. An explicit idle
        window replaces Sail's default and can make automatic sleep happen
        sooner or later. The window only controls when Sail may consider
        sleeping the Sailbox; it still sleeps only when fully idle. Your own
        `sleep`, `pause`, `resume`, and scheduled wakes work the same whatever
        it says.
      properties:
        automatic:
          type: boolean
          default: true
          description: >-
            `true` lets Sail sleep the Sailbox automatically when that is safe,
            which is the default. `false` turns automatic sleeping off. Omitting
            it when you write means `true`. Reads always include it.
        min_seconds_before_sleep:
          type: integer
          minimum: 0
          maximum: 3600
          description: >-
            The idle window to use instead of Sail's default. Whole-second
            values from 1 through 3600 are accepted; 0 restores Sail's default,
            and other numeric values are rejected. Once the window passes, Sail
            may sleep the Sailbox only when it is fully idle. Send it only with
            `automatic: true`; sent alongside `automatic: false` the request is
            rejected, because a caller who meant to set a wait would otherwise
            have silently turned automatic sleeping off. Reads leave it out when
            Sail's default is in effect.
          examples:
            - 30
            - 300
    NetworkPolicyInfo:
      type: object
      description: >-
        A Sailbox's network policy as reported by get/list. Absent means public
        (unrestricted outbound access).
      required:
        - mode
      properties:
        mode:
          type: string
          description: The policy mode, for example `"no_network"`.
        allowed_hosts:
          type: array
          items:
            type: string
          description: Allowlist destinations when the mode uses them; empty otherwise.
    ErrorObject:
      type: object
      required:
        - message
        - type
        - param
        - code
      properties:
        message:
          type: string
          description: Human-readable description of what went wrong.
        type:
          type: string
          description: >-
            Error category: `invalid_request_error`, `authentication_error`,
            `permission_error`, `billing_error`, `not_found_error`,
            `conflict_error`, `rate_limit_error`, `quota_exceeded_error`, or
            `server_error`.
        param:
          oneOf:
            - type: string
            - type: 'null'
          description: >-
            The request field the error refers to, when the error is about one
            field.
        code:
          oneOf:
            - type: string
            - type: integer
            - type: 'null'
          description: >-
            Stable short code for the error, when one applies. Errors relayed
            from the Sailbox runtime carry its status token, for example
            `already_exists` or `failed_precondition` on a 409, which the HTTP
            status alone does not distinguish.
        billing_url:
          type: string
          format: uri
          description: Page where you add credits. Sent with a 402.
      additionalProperties: true
  headers:
    RetryAfter:
      description: >-
        How many seconds to wait before retrying. On a 429 it also means the
        request never started, so the retry can reuse the same
        `Idempotency-Key`.
      schema:
        type: integer
        minimum: 0
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key

````