> ## Documentation Index
> Fetch the complete documentation index at: https://vastai-80aa3a82-auto-openapi-update-b65c39fe.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:
        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.
                disable_bundling:
                  type: boolean
                  description: If true, machines are not bundled into multi-GPU offers.
              additionalProperties:
                type: object
                description: >-
                  Filter expression for an offer field: {operator: value}, e.g.
                  {"gte": 2} or {"in": ["RTX 4090", "RTX 5090"]}.
                properties:
                  eq:
                    description: '"eq" comparison against the field value'
                  neq:
                    description: '"neq" comparison against the field value'
                  gt:
                    description: '"gt" comparison against the field value'
                  gte:
                    description: '"gte" comparison against the field value'
                  lt:
                    description: '"lt" comparison against the field value'
                  lte:
                    description: '"lte" comparison against the field value'
                  in:
                    description: '"in" comparison against the field value'
                  notin:
                    description: '"notin" comparison against the field value'
                additionalProperties: false
            example:
              limit: 100
              type: on-demand
              verified:
                eq: true
              rentable:
                eq: true
              rented:
                eq: false
        description: The raw search query object (not wrapped in a "q" key).
      responses:
        '200':
          description: 'Successful response with matching offers: {"offers": [...]}'
          content:
            application/json:
              schema:
                type: object
                properties:
                  offers:
                    type: array
                    description: >-
                      Array of offer objects with pricing, GPU specs, and
                      scoring fields
                    items:
                      type: object
        '400':
          description: >-
            Invalid query or body: "Invalid query: must be dict of conditions"
            or "Invalid json body"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - BearerAuth: []
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
        msg:
          type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: API key must be provided in the Authorization header

````