{
 "openapi": "3.0.3",
 "info": {
  "title": "Hundredth Run GPU Prices API",
  "version": "1.0.0",
  "description": "Free, keyless JSON API of public cloud GPU rental prices (US dollars per GPU-hour) from 25+ providers. Every row keeps its source URL and the date it was read. Static files, CORS open, refreshed about weekly.",
  "license": {
   "name": "CC BY 4.0",
   "url": "https://creativecommons.org/licenses/by/4.0/"
  },
  "contact": {
   "name": "Hundredth Run",
   "url": "https://hundredthrun-compute-desk.pages.dev/open-data"
  },
  "x-logo": {
   "url": "https://hundredthrun-compute-desk.pages.dev/apple-touch-icon.png"
  }
 },
 "externalDocs": {
  "description": "Docs and examples",
  "url": "https://hundredthrun-compute-desk.pages.dev/open-data"
 },
 "servers": [
  {
   "url": "https://hundredthrun-compute-desk.pages.dev"
  }
 ],
 "tags": [
  {
   "name": "GPU prices"
  }
 ],
 "paths": {
  "/api/v1/prices.json": {
   "get": {
    "operationId": "listPrices",
    "summary": "Every price row",
    "description": "All providers and price types (on-demand, spot, reserved) with source URL, date checked and confidence.",
    "tags": [
     "GPU prices"
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "license": {
           "type": "string"
          },
          "attribution": {
           "type": "string"
          },
          "units": {
           "type": "string"
          },
          "name": {
           "type": "string"
          },
          "generated_from": {
           "type": "string"
          },
          "date_checked_latest": {
           "type": "string"
          },
          "count": {
           "type": "integer"
          },
          "rows": {
           "type": "array",
           "items": {
            "$ref": "#/components/schemas/PriceRow"
           }
          }
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/v1/gpus.json": {
   "get": {
    "operationId": "listGpus",
    "summary": "One summary per GPU",
    "description": "Lowest, median and priciest public on-demand price, provider count and the cheapest listing for each GPU.",
    "tags": [
     "GPU prices"
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "license": {
           "type": "string"
          },
          "attribution": {
           "type": "string"
          },
          "units": {
           "type": "string"
          },
          "gpus": {
           "type": "array",
           "items": {
            "$ref": "#/components/schemas/GpuSummary"
           }
          }
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/v1/models.json": {
   "get": {
    "operationId": "listModels",
    "summary": "Model memory estimates",
    "description": "Estimated VRAM by precision and fine-tune mode for popular open models.",
    "tags": [
     "GPU prices"
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "license": {
           "type": "string"
          },
          "attribution": {
           "type": "string"
          },
          "overhead": {
           "type": "number"
          },
          "method": {
           "type": "string"
          },
          "models": {
           "type": "array",
           "items": {
            "$ref": "#/components/schemas/ModelEstimate"
           }
          }
         }
        }
       }
      }
     }
    }
   }
  }
 },
 "components": {
  "schemas": {
   "PriceRow": {
    "type": "object",
    "properties": {
     "provider": {
      "type": "string"
     },
     "gpu": {
      "type": "string"
     },
     "variant": {
      "type": "string"
     },
     "gpus_per_unit": {
      "type": "string"
     },
     "price_type": {
      "type": "string"
     },
     "term": {
      "type": "string"
     },
     "region": {
      "type": "string"
     },
     "billing_unit": {
      "type": "string"
     },
     "price_as_listed": {
      "type": "string"
     },
     "derivation": {
      "type": "string"
     },
     "availability_note": {
      "type": "string"
     },
     "lead_time_class": {
      "type": "string"
     },
     "source_url": {
      "type": "string",
      "description": "Page the price was read from."
     },
     "date_checked": {
      "type": "string",
      "description": "Date the price was read, YYYY-MM-DD."
     },
     "fetch_method": {
      "type": "string"
     },
     "confidence": {
      "type": "string"
     },
     "notes": {
      "type": "string"
     },
     "price_usd_per_gpu_hr": {
      "type": "number",
      "description": "US dollars per GPU-hour. Null when the provider publishes no price.",
      "nullable": true
     }
    }
   },
   "GpuSummary": {
    "type": "object",
    "properties": {
     "gpu": {
      "type": "string"
     },
     "slug": {
      "type": "string"
     },
     "vram_gb": {
      "type": "number",
      "nullable": true
     },
     "rows": {
      "type": "integer"
     },
     "on_demand": {
      "type": "object",
      "nullable": true,
      "properties": {
       "min": {
        "type": "number"
       },
       "median": {
        "type": "number"
       },
       "max": {
        "type": "number"
       },
       "n": {
        "type": "integer"
       },
       "providers": {
        "type": "integer"
       }
      }
     },
     "cheapest": {
      "type": "object",
      "nullable": true,
      "properties": {
       "provider": {
        "type": "string"
       },
       "variant": {
        "type": "string"
       },
       "price_usd_per_gpu_hr": {
        "type": "number"
       },
       "source_url": {
        "type": "string"
       }
      }
     },
     "page": {
      "type": "string",
      "description": "Price page on this site.",
      "nullable": true
     },
     "last_checked": {
      "type": "string"
     }
    }
   },
   "ModelEstimate": {
    "type": "object",
    "properties": {
     "slug": {
      "type": "string"
     },
     "name": {
      "type": "string"
     },
     "params_b": {
      "type": "number",
      "description": "Parameters in billions."
     },
     "architecture": {
      "type": "string"
     },
     "source_url": {
      "type": "string"
     },
     "date_checked": {
      "type": "string"
     },
     "vram_gb": {
      "type": "object",
      "additionalProperties": {
       "type": "number"
      },
      "description": "Estimated VRAM GB by mode: fp16, fp8, int4, lora, qlora, full."
     }
    }
   }
  }
 }
}
