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

# Create Volume

> Create an empty volume at a site. Send an Idempotency-Key for safe retries



## OpenAPI

````yaml /api/openapi.json post /volumes
openapi: 3.1.0
info:
  description: Programmatic access to Infinite Compute GPU servers, volumes and usage.
  title: Infinite Compute API
  version: v1
servers:
  - url: https://{console}/api/public/v1
    description: Your console address is in your welcome email
    variables:
      console:
        default: your-console-address
security: []
paths:
  /volumes:
    post:
      tags:
        - Volumes
      summary: Create Volume
      description: >-
        Create an empty volume at a site. Send an Idempotency-Key for safe
        retries
      operationId: create_volume_volumes_post
      parameters:
        - description: Any unique string, kept 24 hours
          in: header
          name: Idempotency-Key
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Any unique string, kept 24 hours
            title: Idempotency-Key
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VolumeCreate'
        required: true
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Volume'
          description: Successful Response
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Error
      security:
        - ApiKey: []
components:
  schemas:
    VolumeCreate:
      additionalProperties: false
      properties:
        name:
          maxLength: 64
          minLength: 1
          title: Name
          type: string
        site:
          description: Site id (see GET /server-types); attach only to servers there
          title: Site
          type: string
        size_gb:
          maximum: 2000
          minimum: 1
          title: Size Gb
          type: integer
      required:
        - name
        - size_gb
        - site
      title: VolumeCreate
      type: object
    Volume:
      properties:
        attached_to:
          default: []
          description: Server ids
          items:
            type: string
          title: Attached To
          type: array
        bootable:
          default: false
          title: Bootable
          type: boolean
        created_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Created At
        id:
          title: Id
          type: string
        image_id:
          anyOf:
            - type: string
            - type: 'null'
          description: Set when created from an image
          title: Image Id
        name:
          title: Name
          type: string
        site:
          anyOf:
            - $ref: '#/components/schemas/Site'
            - type: 'null'
        size_gb:
          title: Size Gb
          type: integer
        status:
          description: creating, available, in_use, busy, deleting, error
          title: Status
          type: string
      required:
        - id
        - name
        - size_gb
        - status
      title: Volume
      type: object
    ErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetail'
      required:
        - error
      title: ErrorResponse
      type: object
    Site:
      properties:
        id:
          description: >-
            Stable site id; GET /server-types lists the ones your project can
            use
          title: Id
          type: string
        name:
          description: Display name of the site
          title: Name
          type: string
      required:
        - id
        - name
      title: Site
      type: object
    ErrorDetail:
      properties:
        code:
          description: Machine-readable error code, e.g. not_found
          title: Code
          type: string
        message:
          description: What went wrong, for people
          title: Message
          type: string
        request_id:
          description: Quote this when contacting support
          title: Request Id
          type: string
      required:
        - code
        - message
        - request_id
      title: ErrorDetail
      type: object
  securitySchemes:
    ApiKey:
      description: 'An API key from the console: Authorization: Bearer ic_ck_...'
      scheme: bearer
      type: http

````

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