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

# Get Sandbox Auth Token

> Get a token for direct sandbox access.

## Rate Limit

120 requests per 60 seconds per IP and token per sandbox.


## OpenAPI

````yaml https://api.primeintellect.ai/openapi.json post /api/v1/sandbox/{sandbox_id}/auth
openapi: 3.1.0
info:
  title: PI API
  version: 0.1.0
servers:
  - url: https://api.primeintellect.ai
security: []
paths:
  /api/v1/sandbox/{sandbox_id}/auth:
    post:
      tags:
        - Sandbox
      summary: Get Sandbox Auth Token
      description: Get a token for direct sandbox access.
      operationId: get_sandbox_auth_token_api_v1_sandbox__sandbox_id__auth_post
      parameters:
        - name: sandbox_id
          in: path
          required: true
          schema:
            type: string
            title: Sandbox Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SandboxAuthResponse'
        '401':
          description: Authorization failed
        '422':
          description: Invalid request data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - HTTPBearer: []
components:
  schemas:
    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
    ErrorResponse:
      properties:
        errors:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
          title: Errors
      type: object
      required:
        - errors
      title: ErrorResponse
    ErrorDetail:
      properties:
        param:
          type: string
          title: Param
        details:
          type: string
          title: Details
      type: object
      required:
        - param
        - details
      title: ErrorDetail
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````