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

> Search for available GPU machine offers with advanced filtering and sorting.

Each filter parameter (such as `verified`, `gpu_name`, `num_gpus`, etc.) should be an object specifying the operator and value you want to match.

**Filter operators:**

| Operator | Meaning                | Example                        |
|:---------|:-----------------------|:-------------------------------|
| `eq`     | Equal to               | `{ "eq": true }`               |
| `neq`    | Not equal to           | `{ "neq": false }`             |
| `gt`     | Greater than           | `{ "gt": 0.99 }`               |
| `lt`     | Less than              | `{ "lt": 10000 }`              |
| `gte`    | Greater than or equal  | `{ "gte": 4 }`                 |
| `lte`    | Less than or equal     | `{ "lte": 8 }`                 |
| `in`     | Value is in a list     | `{ "in": ["RTX_3090", "RTX_4090"] }` |
| `notin`  | Value is not in a list | `{ "notin": ["TW", "SE"] }`    |

CLI Usage: `vastai search offers 'reliability > 0.99 num_gpus>=4' --order=dph_total`



## OpenAPI

````yaml /api-reference/openapi.yaml post /api/v0/bundles/
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/bundles/:
    post:
      tags:
        - Search
      summary: search offers
      description: >-
        Search for available GPU machine offers with advanced filtering and
        sorting.


        Each filter parameter (such as `verified`, `gpu_name`, `num_gpus`, etc.)
        should be an object specifying the operator and value you want to match.


        **Filter operators:**


        | Operator | Meaning                | Example                        |

        |:---------|:-----------------------|:-------------------------------|

        | `eq`     | Equal to               | `{ "eq": true }`               |

        | `neq`    | Not equal to           | `{ "neq": false }`             |

        | `gt`     | Greater than           | `{ "gt": 0.99 }`               |

        | `lt`     | Less than              | `{ "lt": 10000 }`              |

        | `gte`    | Greater than or equal  | `{ "gte": 4 }`                 |

        | `lte`    | Less than or equal     | `{ "lte": 8 }`                 |

        | `in`     | Value is in a list     | `{ "in": ["RTX_3090", "RTX_4090"]
        }` |

        | `notin`  | Value is not in a list | `{ "notin": ["TW", "SE"] }`    |


        CLI Usage: `vastai search offers 'reliability > 0.99 num_gpus>=4'
        --order=dph_total`
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                limit:
                  type: integer
                  description: Max offers to return
                type:
                  type: string
                  enum:
                    - ondemand
                    - bid
                    - reserved
                  description: >
                    Instance type for the offer. Affects pricing calculation.


                    - **ondemand**: Fixed pricing based on listed rates.
                    Default.

                    - **bid** (interruptible): Uses minimum bid price. Lower
                    cost but may be interrupted if outbid.

                    - **reserved**: Reserved instance pricing.
                verified:
                  type: object
                  description: Machine verification status
                  properties:
                    eq:
                      type: boolean
                  default:
                    eq: true
                rentable:
                  type: object
                  description: Whether machine is rentable
                  properties:
                    eq:
                      type: boolean
                  default:
                    eq: true
                rented:
                  type: object
                  description: >
                    When set to true, include offers where the calling user
                    already has rented GPUs.

                    This is useful for finding offers on machines you're already
                    renting.
                  properties:
                    eq:
                      type: boolean
                  default:
                    eq: false
                gpu_name:
                  type: object
                  description: >-
                    GPU model name. Example: {"eq": "RTX_4090"} or {"in":
                    ["RTX_3090", "RTX_4090"]}
                  properties:
                    in:
                      type: array
                      items:
                        type: string
                      example:
                        - RTX_3090
                        - RTX_4090
                reliability:
                  type: object
                  description: 'Machine reliability score (0-1). Example: {"gte": 0.99}'
                num_gpus:
                  type: object
                  description: 'Number of GPUs. Example: {"gte": 4} or {"in": [1, 2, 4, 8]}'
                  properties:
                    in:
                      type: array
                      items:
                        type: integer
                      example:
                        - 1
                        - 2
                        - 4
                        - 8
                gpu_ram:
                  type: object
                  description: 'GPU RAM in MB. Example: {"gte": 24000}'
                duration:
                  type: object
                  description: >-
                    Minimum required rental duration in seconds (the offer must
                    be available for at least this long from now).
                machine_id:
                  type: object
                  description: Filter by specific host machine ID
                dlperf_per_dphtotal:
                  type: object
                  description: DLPerf per dollar per hour
                dph_total:
                  type: object
                  description: 'Total $/hour rental cost. Example: {"lte": 0.5}'
                flops_per_dphtotal:
                  type: object
                  description: TFLOPs per $/hour
                geolocation:
                  type: object
                  description: >-
                    Machine location (two letter country code). Example: {"in":
                    ["US", "CA"]}
                  properties:
                    in:
                      type: array
                      items:
                        type: string
                      example:
                        - US
                        - CA
                gpu_arch:
                  type: object
                  description: >-
                    Host machine GPU architecture (e.g. nvidia, amd). Example:
                    {"eq": "nvidia"}
                dlperf:
                  type: object
                  description: Deep Learning performance score
                cuda_max_good:
                  type: object
                  description: Maximum supported CUDA version
                inet_down:
                  type: object
                  description: Download bandwidth (MB/s)
                inet_up:
                  type: object
                  description: Upload bandwidth (MB/s)
                inet_down_cost:
                  type: object
                  description: Download bandwidth cost ($/GB)
                inet_up_cost:
                  type: object
                  description: Upload bandwidth cost ($/GB)
                driver_version:
                  type: object
                  description: NVIDIA driver version in the format "XXX.XX.XX"
                compute_cap:
                  type: object
                  description: >-
                    CUDA compute capability x 100. Use 650 for compute
                    capability 6.5 or 700 for 7.0.
                cpu_arch:
                  type: object
                  description: >-
                    Host machine CPU architecture (Default is amd64). Example:
                    {"eq": "amd64"}
                has_avx:
                  type: object
                  description: CPU supports AVX instruction set
                cpu_cores:
                  type: object
                  description: Number of virtual CPUs
                cpu_cores_effective:
                  type: object
                  description: Effective vCPU count for the offer
                cpu_ghz:
                  type: object
                  description: CPU clock speed in GHz
                cpu_ram:
                  type: object
                  description: CPU RAM in MB
                datacenter:
                  type: object
                  description: Show only datacenter offers
                external:
                  type: object
                  description: Show external offers in addition to datacenter offers
                disk_bw:
                  type: object
                  description: Disk read bandwidth in MB/s
                disk_space:
                  type: object
                  description: Disk storage space in GB
                bw_nvlink:
                  type: object
                  description: >-
                    NVLink interconnect bandwidth in GB/s. Use when filtering
                    for multi-GPU systems with high-speed NVLink.
                gpu_max_power:
                  type: object
                  description: GPU power limit in watts
                gpu_max_temp:
                  type: object
                  description: GPU temperature limit in Celsius
                gpu_mem_bw:
                  type: object
                  description: GPU memory bandwidth in GB/s
                gpu_total_ram:
                  type: object
                  description: Total GPU RAM across all GPUs in MB
                gpu_frac:
                  type: object
                  description: Fraction of the total GPU resources being offered
                gpu_display_active:
                  type: object
                  description: Whether the GPU has an attached display
                direct_port_count:
                  type: object
                  description: Number of direct ports
                host_id:
                  type: object
                  description: Host user ID
                id:
                  type: object
                  description: Offer ID
                min_bid:
                  type: object
                  description: Minimum bid price ($/hour)
                mobo_name:
                  type: object
                  description: Motherboard name
                pci_gen:
                  type: object
                  description: PCIe generation
                pcie_bw:
                  type: object
                  description: PCIe bandwidth (CPU to GPU)
                storage_cost:
                  type: object
                  description: Storage cost in $/GB/month
                static_ip:
                  type: object
                  description: Whether the IP address is static/stable
                total_flops:
                  type: object
                  description: >-
                    Total theoretical GPU compute performance (TFLOPs) across
                    all GPUs.
                os_version:
                  type: object
                  description: Host machine Ubuntu OS version
                ubuntu_version:
                  type: object
                  description: Host machine Ubuntu OS version (alias for os_version)
                verification:
                  type: object
                  description: >-
                    Machine verification status string (verified, deverified,
                    unverified). Example: {"eq": "verified"}
                vms_enabled:
                  type: object
                  description: Whether the machine is a VM instance
                order:
                  type: array
                  description: |
                    List of sort fields and directions.
                    Each entry should contain two elements:
                    1. The field name to sort by (string)
                    2. The sort direction ("asc" or "desc")
                  items:
                    type: array
                    items:
                      type: string
                  minItems: 2
                  maxItems: 2
                allocated_storage:
                  type: number
                  description: >
                    Storage allocation size in GB for the instance.

                    This sets the disk size when creating the instance and
                    cannot be changed later.

                    Default is 8GB.
            example:
              limit: 100
              type: on-demand
              verified:
                eq: true
              rentable:
                eq: true
              rented:
                eq: false
      responses:
        '200':
          description: Successful search response
          content:
            application/json:
              schema:
                type: object
                properties:
                  offers:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
              example:
                offers:
                  id: 12345678
                  ask_contract_id: 12345678
                  bundle_id: 987654321
                  bundled_results: null
                  bw_nvlink: 0
                  compute_cap: 900
                  cpu_arch: amd64
                  cpu_cores: 64
                  cpu_cores_effective: 32
                  cpu_ghz: 2.99
                  cpu_name: QuantumX 128-Core Processor
                  cpu_ram: 65536
                  credit_discount_max: 0.15
                  cuda_max_good: 11.2
                  direct_port_count: 42
                  disk_bw: 1234.5
                  disk_name: HYPERDISK 8TB
                  disk_space: 2048.5
                  dlperf: 222.22
                  dlperf_per_dphtotal: 333.33
                  dph_base: 0.123456
                  dph_total: 0.234567
                  driver_version: 999.99.99
                  driver_vers: 999999999
                  duration: 1234567.89
                  end_date: 1893456000
                  external: null
                  flops_per_dphtotal: 444.44
                  geolocation: Atlantis, AT
                  geolocode: 42424242
                  gpu_arch: nvidia
                  gpu_display_active: false
                  gpu_frac: 0.75
                  gpu_ids:
                    - 1111
                    - 2222
                  gpu_lanes: 16
                  gpu_mem_bw: 888.8
                  gpu_name: Imaginary RTX 9999
                  gpu_ram: 24576
                  gpu_total_ram: 49152
                  gpu_max_power: 450
                  gpu_max_temp: 42
                  has_avx: 1
                  host_id: 55555
                  hosting_type: 0
                  hostname: null
                  inet_down: 9876.5
                  inet_down_cost: 0.00123
                  inet_up: 8765.4
                  inet_up_cost: 0.00456
                  is_bid: false
                  logo: /static/logos/fake_logo.png
                  machine_id: 88888
                  min_bid: 0.111111
                  mobo_name: FANTASY-MOBO-2025
                  num_gpus: 4
                  os_version: '42.42'
                  pci_gen: 6
                  pcie_bw: 99.9
                  public_ipaddr: 203.0.113.42
                  reliability: 0.9999
                  reliability_mult: 0.8888
                  rentable: true
                  rented: false
                  score: 1234.5678
                  start_date: 1893450000.5
                  static_ip: true
                  storage_cost: 0.987654
                  storage_total_cost: 0.123456
                  total_flops: 999.99
                  verification: verified
                  vericode: 1
                  vram_costperhour: 0.009876
                  webpage: null
                  vms_enabled: false
                  expected_reliability: 0.5
                  is_vm_deverified: false
                  resource_type: gpu
                  cluster_id: null
                  avail_vol_ask_id: 333333
                  avail_vol_dph: 0.000321
                  avail_vol_size: 4096
                  nw_disk_min_bw: null
                  nw_disk_max_bw: null
                  nw_disk_avg_bw: null
                  rn: 1
                  dph_total_adj: 0.345678
                  reliability2: 0.9999
                  discount_rate: 0.05
                  discounted_hourly: 0.01
                  discounted_dph_total: 0.224567
                  search:
                    gpuCostPerHour: 0.123456
                    diskHour: 0.123456
                    totalHour: 0.234567
                    discountTotalHour: 0.01
                    discountedTotalPerHour: 0.224567
                  instance:
                    gpuCostPerHour: 0.01
                    diskHour: 0.02
                    totalHour: 0.03
                    discountTotalHour: 0.001
                    discountedTotalPerHour: 0.029
                  time_remaining: ''
                  time_remaining_isbid: ''
                  internet_up_cost_per_tb: 1.23
                  internet_down_cost_per_tb: 4.56
        '400':
          description: Bad request - invalid query parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: invalid_request
                  msg:
                    type: string
                    example: Invalid json body
        '404':
          description: Unauthorized - invalid or missing API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  msg:
                    type: string
                    example: Invalid user key
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: API key must be provided in the Authorization header

````