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

# List Sandboxes

> List sandboxes for user or team

## Rate Limit

1000 requests per 60 seconds per IP and token.


## OpenAPI

````yaml https://api.primeintellect.ai/api/v1/sandbox/openapi.json get /api/v1/sandbox
openapi: 3.1.0
info:
  title: PI API
  version: 0.1.0
servers:
  - url: https://api.primeintellect.ai
security: []
paths:
  /api/v1/sandbox:
    get:
      tags:
        - Sandbox
      summary: List Sandboxes
      description: List sandboxes for user or team
      operationId: list_sandboxes_api_v1_sandbox_get
      parameters:
        - name: team_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by team ID
            title: Team Id
          description: Filter by team ID
        - name: user_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Filter by user ID. When set to another user's ID, the caller must
              be a team admin of the provided team_id.
            title: User Id
          description: >-
            Filter by user ID. When set to another user's ID, the caller must be
            a team admin of the provided team_id.
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/SandboxStatus'
              - type: 'null'
            description: Filter by status
            title: Status
          description: Filter by status
        - name: is_active
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            description: Filter to exclude terminated sandboxes when True
            title: Is Active
          description: Filter to exclude terminated sandboxes when True
        - name: labels
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                type: array
              - type: 'null'
            description: Filter by labels (sandboxes must have ALL specified labels)
            title: Labels
          description: Filter by labels (sandboxes must have ALL specified labels)
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            description: Page number
            default: 1
            title: Page
          description: Page number
        - name: per_page
          in: query
          required: false
          schema:
            type: integer
            maximum: 1000
            minimum: 1
            description: Items per page
            default: 50
            title: Per Page
          description: Items per page
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Opaque pagination cursor from next_cursor. Pages the full history
              at constant cost; page is ignored and total is null
            title: Cursor
          description: >-
            Opaque pagination cursor from next_cursor. Pages the full history at
            constant cost; page is ignored and total is null
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SandboxListResponse'
        '401':
          description: Authorization failed
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    SandboxStatus:
      type: string
      enum:
        - PENDING
        - PROVISIONING
        - RUNNING
        - PAUSED
        - ERROR
        - TERMINATED
        - TIMEOUT
      title: SandboxStatus
    SandboxListResponse:
      properties:
        sandboxes:
          items:
            $ref: '#/components/schemas/SandboxResponse'
          type: array
          title: Sandboxes
        total:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total
        page:
          type: integer
          title: Page
        per_page:
          type: integer
          title: Per Page
        has_next:
          type: boolean
          title: Has Next
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
      type: object
      required:
        - sandboxes
        - page
        - per_page
        - has_next
      title: SandboxListResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SandboxResponse:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        dockerImage:
          type: string
          title: Dockerimage
        startCommand:
          anyOf:
            - $ref: '#/components/schemas/StartCommand'
            - type: string
            - type: 'null'
          title: Startcommand
        cpuCores:
          type: number
          title: Cpucores
        memoryGB:
          type: number
          title: Memorygb
        diskSizeGB:
          type: number
          title: Disksizegb
        diskMountPath:
          type: string
          title: Diskmountpath
        gpuCount:
          type: integer
          title: Gpucount
        gpuType:
          anyOf:
            - $ref: '#/components/schemas/GPUType'
            - type: 'null'
        vm:
          type: boolean
          title: Vm
          default: false
        network_allowlist:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Network Allowlist
        network_denylist:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Network Denylist
        status:
          $ref: '#/components/schemas/SandboxStatus'
        timeoutMinutes:
          type: integer
          title: Timeoutminutes
        idleTimeoutMinutes:
          anyOf:
            - type: integer
            - type: 'null'
          title: Idletimeoutminutes
        terminationReason:
          anyOf:
            - type: string
            - type: 'null'
          title: Terminationreason
        environmentVars:
          anyOf:
            - type: object
            - type: 'null'
          title: Environmentvars
        advancedConfigs:
          anyOf:
            - type: object
            - type: 'null'
          title: Advancedconfigs
        labels:
          items:
            type: string
          type: array
          title: Labels
        createdAt:
          type: string
          format: date-time
          title: Createdat
        updatedAt:
          type: string
          format: date-time
          title: Updatedat
        startedAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Startedat
        terminatedAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Terminatedat
        exitCode:
          anyOf:
            - type: integer
            - type: 'null'
          title: Exitcode
        errorType:
          anyOf:
            - type: string
            - type: 'null'
          title: Errortype
        errorMessage:
          anyOf:
            - type: string
            - type: 'null'
          title: Errormessage
        userId:
          anyOf:
            - type: string
            - type: 'null'
          title: Userid
        teamId:
          anyOf:
            - type: string
            - type: 'null'
          title: Teamid
        kubernetesJobId:
          anyOf:
            - type: string
            - type: 'null'
          title: Kubernetesjobid
        registryCredentialsId:
          anyOf:
            - type: string
            - type: 'null'
          title: Registrycredentialsid
        pendingImageBuildId:
          anyOf:
            - type: string
            - type: 'null'
          title: Pendingimagebuildid
          description: >-
            Set while the sandbox is PENDING because its VM image artifact is
            being built automatically (first VM use of this image). The sandbox
            starts on its own once the build completes.
        gatewayAuth:
          anyOf:
            - $ref: '#/components/schemas/SandboxAuthResponse'
            - type: 'null'
          description: >-
            Gateway credentials, returned on create when the API token has
            sandbox:read. Same payload as POST /sandbox/{id}/auth.
      type: object
      required:
        - id
        - name
        - dockerImage
        - startCommand
        - cpuCores
        - memoryGB
        - diskSizeGB
        - diskMountPath
        - gpuCount
        - status
        - timeoutMinutes
        - environmentVars
        - advancedConfigs
        - createdAt
        - updatedAt
        - startedAt
        - terminatedAt
        - userId
        - teamId
        - kubernetesJobId
      title: SandboxResponse
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    StartCommand:
      properties:
        executable:
          type: string
          minLength: 1
          title: Executable
        args:
          items:
            type: string
          type: array
          title: Args
      additionalProperties: false
      type: object
      required:
        - executable
      title: StartCommand
      description: A process to start without invoking a shell.
    GPUType:
      type: string
      enum:
        - CPU_NODE
        - A10_24GB
        - A100_80GB
        - A100_40GB
        - A30_24GB
        - A40_48GB
        - B200_180GB
        - B300_262GB
        - GB200
        - GB300
        - RTX3070_8GB
        - RTX3070_8GB
        - RTX3080_10GB
        - RTX3080Ti_12GB
        - RTX3090_24GB
        - RTX3090Ti_24GB
        - RTX4070Ti_12GB
        - RTX4080_16GB
        - RTX4080Ti_16GB
        - RTX4090_24GB
        - RTX5090_32GB
        - H100_80GB
        - H200_96GB
        - GH200_96GB
        - H200_141GB
        - GH200_480GB
        - GH200_624GB
        - L4_24GB
        - L40_48GB
        - L40S_48GB
        - RTX4000_8GB
        - RTX5000_16GB
        - RTX6000_24GB
        - RTX8000_48GB
        - RTX2000Ada_16GB
        - RTX4000Ada_20GB
        - RTX5000Ada_32GB
        - RTX6000Ada_48GB
        - A2000_6GB
        - A4000_16GB
        - A4500_20GB
        - A5000_24GB
        - A6000_48GB
        - V100_16GB
        - V100_32GB
        - P100_16GB
        - T4_16GB
        - P4_8GB
        - P40_24GB
        - RTX_PRO_6000B_96GB
        - MI355X_288GB
      title: GPUType
    SandboxAuthResponse:
      properties:
        token:
          type: string
          title: Token
          description: JWT token for direct sandbox access
        gateway_url:
          type: string
          title: Gateway Url
          description: Gateway URL for direct sandbox operations
        user_ns:
          type: string
          title: User Ns
          description: User namespace for sandbox access
        job_id:
          type: string
          title: Job Id
          description: Job ID for sandbox access
        expires_at:
          type: string
          format: date-time
          title: Expires At
          description: Token expiration time
      type: object
      required:
        - token
        - gateway_url
        - user_ns
        - job_id
        - expires_at
      title: SandboxAuthResponse
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````