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



## OpenAPI

````yaml https://api.primeintellect.ai/openapi.json post /api/v1/training/volumes/{name}/sessions
openapi: 3.1.0
info:
  title: PI API
  version: 0.1.0
servers:
  - url: https://api.primeintellect.ai
security: []
paths:
  /api/v1/training/volumes/{name}/sessions:
    post:
      tags:
        - training
      summary: Create Volume Session
      operationId: create_volume_session_api_v1_training_volumes__name__sessions_post
      parameters:
        - name: name
          in: path
          required: true
          schema:
            type: string
            title: Name
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateVolumeSessionRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VolumeSessionResponse'
        '401':
          description: Authorization failed
        '422':
          description: Invalid request data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - HTTPBearer: []
components:
  schemas:
    CreateVolumeSessionRequest:
      properties:
        teamId:
          anyOf:
            - type: string
            - type: 'null'
          title: Teamid
        readOnly:
          type: boolean
          title: Readonly
          default: true
        subPath:
          anyOf:
            - type: string
            - type: 'null'
          title: Subpath
        allowWritable:
          type: boolean
          title: Allowwritable
          default: false
      type: object
      title: CreateVolumeSessionRequest
    VolumeSessionResponse:
      properties:
        id:
          type: string
          title: Id
        volumeName:
          type: string
          title: Volumename
        status:
          type: string
          title: Status
        readOnly:
          type: boolean
          title: Readonly
        sshConnection:
          anyOf:
            - type: string
            - type: 'null'
          title: Sshconnection
        gateway:
          anyOf:
            - $ref: '#/components/schemas/VolumeSessionGateway'
            - type: 'null'
        hostPublicKey:
          anyOf:
            - type: string
            - type: 'null'
          title: Hostpublickey
        errorMessage:
          anyOf:
            - type: string
            - type: 'null'
          title: Errormessage
      type: object
      required:
        - id
        - volumeName
        - status
        - readOnly
      title: VolumeSessionResponse
    ErrorResponse:
      properties:
        errors:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
          title: Errors
      type: object
      required:
        - errors
      title: ErrorResponse
    VolumeSessionGateway:
      properties:
        host:
          type: string
          title: Host
        port:
          type: integer
          title: Port
        certSha256:
          type: string
          title: Certsha256
      type: object
      required:
        - host
        - port
        - certSha256
      title: VolumeSessionGateway
    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

````