Together AI DeploymentsVolumes API

The DeploymentsVolumes API from Together AI — 1 operation(s) for deploymentsvolumes.

Documentation

Specifications

Other Resources

OpenAPI Specification

together-ai-deploymentsvolumes-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: remediation.proto Audio DeploymentsVolumes API
  version: version not set
servers:
- url: https://api.together.xyz/v1
security:
- bearerAuth: []
tags:
- name: DeploymentsVolumes
paths:
  /deployments/storage/volumes:
    get:
      description: Retrieve all volumes in your project
      summary: Get the list of project volumes
      tags:
      - DeploymentsVolumes
      x-codeSamples:
      - lang: Python
        label: Together AI SDK (v2)
        source: 'from together import Together

          client = Together()


          volumes = client.beta.jig.storage.volumes.list()

          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.storage.volumes.list();

          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.storage.volumes.list();

          console.log(volumes);

          '
      - lang: Shell
        label: cURL
        source: "curl -X GET \\\n      -H \"Authorization: Bearer $TOGETHER_API_KEY\" \\\n      https://api.together.ai/v1/deployments/storage/volumes\n"
      responses:
        '200':
          description: List of volumes
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListVolumesResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
    post:
      description: Create a new volume to preload files in deployments
      summary: Create a new volume
      tags:
      - DeploymentsVolumes
      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 \\\n      -H \"Authorization: Bearer $TOGETHER_API_KEY\" \\\n      --data '{ \"name\": \"my-volume\" }' \\\n      https://api.together.ai/v1/deployments/storage/volumes\n"
      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
components:
  schemas:
    VersionHistoryItem:
      properties:
        content:
          $ref: '#/components/schemas/VolumeContentRequest'
        mounted_by:
          items:
            type: string
          type: array
          uniqueItems: false
        version:
          type: integer
      type: object
    VolumeContentRequest:
      description: Content specifies the new content that will be preloaded 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 that will be preloaded 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
    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
    ListVolumesResponse:
      properties:
        data:
          description: Data is the array of volume items
          items:
            $ref: '#/components/schemas/VolumeResponseItem'
          type: array
        object:
          description: The object type, which is always `list`.
          const: list
      type: object
    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
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      x-bearer-format: bearer
      x-default: default