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

# Create Volume Endpoint

> Create an empty volume in the caller's personal scope or in a team.



## OpenAPI

````yaml https://api.primeintellect.ai/api/v1/sandbox/openapi.json post /api/v1/sandbox/volumes
openapi: 3.1.0
info:
  title: PI API
  version: 0.1.0
servers:
  - url: https://api.primeintellect.ai
security: []
paths:
  /api/v1/sandbox/volumes:
    post:
      tags:
        - Sandbox Volumes
      summary: Create Volume Endpoint
      description: Create an empty volume in the caller's personal scope or in a team.
      operationId: create_volume_endpoint_api_v1_sandbox_volumes_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateVolumeRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VolumeResponse'
        '401':
          description: Authorization failed
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    CreateVolumeRequest:
      properties:
        name:
          type: string
          pattern: ^[a-z0-9]([a-z0-9-]{0,38}[a-z0-9])?$
          title: Name
          description: Volume name, unique in its scope
        team_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Team Id
          description: >-
            Create a team volume in this team. The caller must be a member.
            Omitted: a personal volume in the caller's own scope.
        size_gb:
          anyOf:
            - type: integer
              maximum: 10240
              minimum: 100
            - type: 'null'
          title: Size Gb
          description: >-
            Volume size in whole GiB, grow-only from the base image's 100 GiB.
            Omitted: the base image size.
      type: object
      required:
        - name
      title: CreateVolumeRequest
    VolumeResponse:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: User Id
        team_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Team Id
        head_checkpoint_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Head Checkpoint Id
        created_at:
          type: string
          format: date-time
          title: Created At
        occupied_bytes:
          type: integer
          title: Occupied Bytes
          default: 0
        size_gb:
          type: integer
          title: Size Gb
          default: 100
        account_storage_used_bytes:
          anyOf:
            - type: integer
            - type: 'null'
          title: Account Storage Used Bytes
        account_storage_limit_gb:
          anyOf:
            - type: integer
            - type: 'null'
          title: Account Storage Limit Gb
      type: object
      required:
        - id
        - name
        - created_at
      title: VolumeResponse
      description: |-
        One volume, scoped to its single owner (exactly one of user/team).

        occupied_bytes is the current published version's non-hole uncompressed
        size (the head checkpoint's occupiedBytes). The GET response fills the
        account fields with the caller's volume-storage usage (bytes) and wallet
        limit (whole GiB); list items leave them null and the page-level
        VolumeListResponse carries them instead. occupied_bytes defaults to 0
        legitimately: create_volume returns a bare Volume row (nothing published
        yet, no head to join), and list/get/resize rows carry the joined head
        bytes.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````