> ## Documentation Index
> Fetch the complete documentation index at: https://vastai-80aa3a82-fix-google-validation-docs-404s.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# search volumes

> Search for available volumes based on specified criteria.

CLI Usage: `vastai search volumes <query> [options]`



## OpenAPI

````yaml /api-reference/openapi.yaml post /api/v0/volumes/search/
openapi: 3.1.0
info:
  title: Vast.ai API
  description: >-
    Vast.ai REST API for managing GPU cloud instances, machine operations, and
    AI/ML workflows.


    ## AI Agent Quick-Start


    Install the CLI skill for your agent (Claude Code, Cursor, Windsurf, etc.):
      npx skills add vast-ai/vast-cli

    CLI reference:
    https://raw.githubusercontent.com/vast-ai/vast-cli/master/vastai/SKILL.md

    SDK reference:
    https://raw.githubusercontent.com/vast-ai/vast-cli/master/vastai_sdk/SKILL.md


    ## Auth

    All endpoints require `Authorization: Bearer $VAST_API_KEY`.

    Get your key at: https://cloud.vast.ai/manage-keys/


    ## Key Quirks

    - `gpu_ram` in CLI = GB; in REST API = MB (CLI auto-converts)

    - SSH keys must be registered BEFORE creating an instance (VM: no recovery;
    Docker: can add post-create)

    - `onstart` field is limited to 4048 characters -- gzip+base64 for longer
    scripts

    - `POST /api/v0/asks/{id}/` (create instance) returns `new_contract` as the
    instance ID, not `id`

    - Poll trap: if `actual_status` becomes `exited`, `unknown`, or `offline` it
    will never reach `running` -- destroy and retry
  version: 1.0.0
  contact:
    name: Vast.ai Support
    url: https://discord.gg/vast
servers:
  - url: https://console.vast.ai
    description: Production server
security:
  - BearerAuth: []
paths:
  /api/v0/volumes/search/:
    post:
      tags:
        - Volumes
      summary: search volumes
      description: |-
        Search for available volumes based on specified criteria.

        CLI Usage: `vastai search volumes <query> [options]`
      parameters:
        - name: q
          in: query
          required: false
          schema:
            type: object
            properties:
              limit:
                type: integer
                description: Maximum number of results to return
                default: 64
                example: 100
          description: Query parameters for filtering volume search results
          example:
            limit: 100
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                limit:
                  type: integer
                  description: Maximum number of results to return
                  default: 64
                  example: 100
      responses:
        '200':
          description: Success response
          content:
            application/json:
              schema:
                type: object
                properties:
                  offers:
                    type: array
                    items:
                      $ref: '#/components/schemas/VolumeOffer'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    enum:
                      - invalid_args
                      - invalid_request
                  msg:
                    type: string
                    example: 'Invalid query: {query}, must be dict of conditions'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    example: API requests too frequent endpoint threshold=5.5
      security:
        - BearerAuth: []
components:
  schemas:
    VolumeOffer:
      type: object
      properties:
        ask_contract_id:
          type: integer
          description: Contract ID for the ask
        bundle_id:
          type: integer
          description: Bundle ID
        cpu_arch:
          type: string
          description: CPU architecture
          example: amd64
        cpu_ghz:
          type: number
          description: CPU clock speed in GHz
        cpu_name:
          type: string
          description: CPU model name
          example: AMD EPYC 7K62 48-Core Processor
        cuda_max_good:
          type: number
          description: Maximum CUDA version supported
          example: 12.8
        disk_bw:
          type: number
          description: Disk bandwidth
        disk_name:
          type: string
          description: Disk model name
          example: FIKWOT FN955 4TB
        disk_space:
          type: number
          description: Available disk space in GB
          example: 10
        driver_vers:
          type: string
          description: Driver version (deprecated)
        driver_version:
          type: string
          description: NVIDIA driver version
          example: 570.124.04
        duration:
          type: number
          description: Duration of the contract
        end_date:
          type: number
          description: End date as Unix timestamp
        external:
          type: boolean
          description: Whether the volume is external
        geolocation:
          type: string
          description: Geographic location
        geolocode:
          type: string
          description: Geographic location code
        gpu_arch:
          type: string
          description: GPU architecture
        host_id:
          type: integer
          description: Host ID
          example: 166946
        id:
          type: integer
          description: Unique identifier for the volume offer
        inet_down:
          type: number
          description: Download internet speed in Mbps
          example: 654.6
        inet_up:
          type: number
          description: Upload internet speed in Mbps
          example: 78.9
        machine_id:
          type: integer
          description: Machine ID
          example: 36683
        mobo_name:
          type: string
          description: Motherboard model name
          example: ROME2D32GM-2T
        reliability:
          type: number
          description: Reliability score
        reliability2:
          type: number
          description: Alternative reliability score
          example: 0.9649497
        reliability_mult:
          type: number
          description: Reliability multiplier
        start_date:
          type: number
          description: Start date as Unix timestamp
          example: 1747341046.4320989
        static_ip:
          type: boolean
          description: Whether the machine has a static IP
          example: true
        storage_cost:
          type: number
          description: Storage cost
        storage_total_cost:
          type: number
          description: Total storage cost
          example: 0.0005555555555555557
        vericode:
          type: string
          description: Verification code
        verification:
          type: string
          description: Verification status
          example: verified
        vms_enabled:
          type: boolean
          description: Whether VMs are enabled
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: API key must be provided in the Authorization header

````