{
  "openapi": "3.1.0",
  "info": {
    "title": "GrabGPU",
    "version": "1.0.0",
    "description": "Cloud GPU rental prices and the stock each provider reported at the last daily check. Free, no key."
  },
  "servers": [
    {
      "url": "https://grabgpu.com"
    }
  ],
  "paths": {
    "/api/search": {
      "get": {
        "operationId": "findGpu",
        "summary": "Find cloud GPUs to rent now, rentable first, cheapest first",
        "parameters": [
          {
            "name": "gpu",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "GPU model, e.g. H100, B300, RTX 4090"
          },
          {
            "name": "in_stock",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": true
            },
            "description": "Only offers reported in stock"
          },
          {
            "name": "min_gpus",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Smallest node size needed, e.g. 8"
          },
          {
            "name": "max_price",
            "in": "query",
            "schema": {
              "type": "number"
            },
            "description": "Highest USD per GPU hour"
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matching offers. Give the buyer rent_url; it redirects to the provider (some are referral links, same price for the buyer).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "captured_at": {
                      "type": "string"
                    },
                    "offers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "gpu": {
                            "type": "string"
                          },
                          "gpu_name": {
                            "type": "string"
                          },
                          "vram_gb": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "provider_name": {
                            "type": "string"
                          },
                          "usd_per_gpu_hour": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "availability": {
                            "type": "string",
                            "enum": [
                              "in_stock",
                              "unknown",
                              "out_of_stock"
                            ]
                          },
                          "max_gpus": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "rent_url": {
                            "type": "string"
                          },
                          "is_referral": {
                            "type": "boolean"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}