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

# Create a new volume

> Create a new volume to preload files in deployments



## OpenAPI

````yaml POST /deployments/storage/volumes
openapi: 3.1.0
info:
  title: Together APIs
  description: The Together REST API. See https://docs.together.ai for more details.
  version: 2.0.0
  termsOfService: https://www.together.ai/terms-of-service
  contact:
    name: Together Support
    url: https://www.together.ai/contact
  license:
    name: MIT
    url: https://github.com/togethercomputer/openapi/blob/main/LICENSE
servers:
  - url: https://api.together.ai/v1
security:
  - bearerAuth: []
paths:
  /deployments/storage/volumes:
    post:
      tags:
        - DeploymentsVolumes
      summary: Create a new volume
      description: Create a new volume to preload files in deployments
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateVolumeRequest'
        description: Volume configuration
        required: true
      responses:
        '200':
          description: Volume created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VolumeResponseItem'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                type: object
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
      x-codeSamples:
        - lang: Python
          label: Together AI SDK (v2)
          source: |
            from together import Together
            client = Together()

            volumes = client.beta.jig.volumes.create(name="my-volume")
            print(volumes)
        - lang: TypeScript
          label: Together AI SDK (TypeScript)
          source: >
            import Together from "together-ai";

            const client = new Together();


            const volumes = await client.beta.jig.volumes.create({ name:
            "my-volume" });

            console.log(volumes);
        - lang: JavaScript
          label: Together AI SDK (JavaScript)
          source: >
            import Together from "together-ai";

            const client = new Together();


            const volumes = await client.beta.jig.volumes.create({ name:
            "my-volume" });

            console.log(volumes);
        - lang: Shell
          label: cURL
          source: |
            curl -X POST \
                  -H "Authorization: Bearer $TOGETHER_API_KEY" \
                  --data '{ "name": "my-volume" }' \
                  https://api.together.ai/v1/deployments/storage/volumes
components:
  schemas:
    CreateVolumeRequest:
      properties:
        content:
          allOf:
            - $ref: '#/components/schemas/VolumeContentRequest'
          description: Content specifies the content configuration for this volume
        name:
          description: Name is the unique identifier for the volume within the project
          type: string
        type:
          allOf:
            - $ref: '#/components/schemas/VolumeType'
          description: Type is the volume type (currently only "readOnly" is supported)
      required:
        - content
        - name
        - type
      type: object
    VolumeResponseItem:
      properties:
        content:
          $ref: '#/components/schemas/VolumeContent'
        created_at:
          description: CreatedAt is the ISO8601 timestamp when this volume was created
          type: string
        current_version:
          description: CurrentVersion is the current version number of this volume
          type: integer
        id:
          description: ID is the unique identifier for this volume
          type: string
        mounted_by:
          description: >-
            MountedBy is the list of deployment IDs currently mounting current
            volume version
          items:
            type: string
          type: array
          uniqueItems: false
        name:
          description: Name is the name of the volume
          type: string
        object:
          description: Object is the type identifier for this response (always "volume")
          type: string
        type:
          $ref: '#/components/schemas/VolumeType'
        updated_at:
          description: UpdatedAt is the ISO8601 timestamp when this volume was last updated
          type: string
        version_history:
          additionalProperties:
            $ref: '#/components/schemas/VersionHistoryItem'
          description: >-
            VersionHistory contains previous versions of this volume, keyed by
            version number
          type: object
      type: object
    VolumeContentRequest:
      description: Content specifies the new content to preload to this volume.
      properties:
        source_prefix:
          description: >-
            SourcePrefix is the file path prefix for the content to be preloaded
            into the volume
          example: models/
          type: string
        type:
          description: >-
            Type is the content type (currently only "files" is supported which
            allows preloading files uploaded via Files API into the volume)
          enum:
            - files
          example: files
          type: string
      type: object
    VolumeType:
      enum:
        - readOnly
      type: string
      x-enum-varnames:
        - VolumeTypeReadOnly
    VolumeContent:
      properties:
        files:
          description: >-
            Files is the list of files to preload into the volume, if the volume
            content type is "files".
          items:
            $ref: '#/components/schemas/FileInfo'
          type: array
          uniqueItems: false
        source_prefix:
          description: >-
            SourcePrefix is the file path prefix for the content to be preloaded
            into the volume
          example: models/
          type: string
        type:
          description: >-
            Type is the content type (currently only "files" is supported which
            allows preloading files uploaded via Files API into the volume)
          enum:
            - files
          example: files
          type: string
      type: object
    VersionHistoryItem:
      properties:
        content:
          $ref: '#/components/schemas/VolumeContentRequest'
        mounted_by:
          items:
            type: string
          type: array
          uniqueItems: false
        version:
          type: integer
      type: object
    FileInfo:
      properties:
        last_modified:
          description: LastModified is the timestamp when the file was last modified
          type: string
        name:
          description: Name is the filename including extension (e.g., "model_weights.bin")
          type: string
        size:
          description: Size is the file size in bytes
          type: integer
      type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      x-bearer-format: bearer
      x-default: default

````