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

# Volume Transfer

> Where `prime volumes get/put` should transfer (ENG-6585). A put
needs rft:write, like every other volume write.



## OpenAPI

````yaml https://api.primeintellect.ai/openapi.json post /api/v1/training/volumes/{name}/transfer
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}/transfer:
    post:
      tags:
        - training
      summary: Volume Transfer
      description: |-
        Where `prime volumes get/put` should transfer (ENG-6585). A put
        needs rft:write, like every other volume write.
      operationId: volume_transfer_api_v1_training_volumes__name__transfer_post
      parameters:
        - name: name
          in: path
          required: true
          schema:
            type: string
            title: Name
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VolumeTransferRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VolumeTransferResponse'
        '401':
          description: Authorization failed
        '422':
          description: Invalid request data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - HTTPBearer: []
components:
  schemas:
    VolumeTransferRequest:
      properties:
        mode:
          type: string
          enum:
            - get
            - put
          title: Mode
        path:
          type: string
          title: Path
          default: ''
        entries:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Entries
        leaseId:
          anyOf:
            - type: string
              pattern: ^[A-Za-z0-9-]{1,64}$
            - type: 'null'
          title: Leaseid
        teamId:
          anyOf:
            - type: string
            - type: 'null'
          title: Teamid
      type: object
      required:
        - mode
      title: VolumeTransferRequest
    VolumeTransferResponse:
      properties:
        via:
          type: string
          enum:
            - session
            - r2
          title: Via
        session:
          anyOf:
            - $ref: '#/components/schemas/VolumeSessionResponse'
            - type: 'null'
        endpoint:
          anyOf:
            - type: string
            - type: 'null'
          title: Endpoint
        bucket:
          anyOf:
            - type: string
            - type: 'null'
          title: Bucket
        prefix:
          anyOf:
            - type: string
            - type: 'null'
          title: Prefix
        accessKeyId:
          anyOf:
            - type: string
            - type: 'null'
          title: Accesskeyid
        secretAccessKey:
          anyOf:
            - type: string
            - type: 'null'
          title: Secretaccesskey
        sessionToken:
          anyOf:
            - type: string
            - type: 'null'
          title: Sessiontoken
        expiresAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expiresat
        leaseId:
          anyOf:
            - type: string
            - type: 'null'
          title: Leaseid
      type: object
      required:
        - via
      title: VolumeTransferResponse
      description: |-
        `via: session`: transfer through `session` (the caller's live
        read-write session). `via: r2`: transfer directly with these
        prefix-scoped credentials (read-only for get, read-write for put); a
        put's carry `leaseId`, to send on refresh and to release when done.
    ErrorResponse:
      properties:
        errors:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
          title: Errors
      type: object
      required:
        - errors
      title: ErrorResponse
    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
        createdAt:
          type: string
          format: date-time
          title: Createdat
        phase:
          anyOf:
            - type: string
            - type: 'null'
          title: Phase
        progress:
          anyOf:
            - type: string
            - type: 'null'
          title: Progress
      type: object
      required:
        - id
        - volumeName
        - status
        - readOnly
        - createdAt
      title: VolumeSessionResponse
    ErrorDetail:
      properties:
        param:
          type: string
          title: Param
        details:
          type: string
          title: Details
      type: object
      required:
        - param
        - details
      title: ErrorDetail
    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
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.