{
 "openapi": "3.1.0",
 "info": {
  "title": "RentServers.com API",
  "version": "1.0.0",
  "description": "Read-only server price index, the 36-month quote scorecard, 2026 provider repricing data, and blind counter-quote requests. Every response carries source_url and action_url. The same four operations are MCP tools at /mcp."
 },
 "servers": [
  {
   "url": "https://rentservers.com"
  }
 ],
 "paths": {
  "/api/v1/price-index": {
   "get": {
    "operationId": "get_server_price_index",
    "summary": "GPU, dedicated and VPS price benchmarks, dated and sourced",
    "parameters": [
     {
      "name": "category",
      "in": "query",
      "required": false,
      "description": "gpu, dedicated or vps",
      "schema": {
       "type": "string",
       "enum": [
        "gpu",
        "dedicated",
        "vps"
       ]
      }
     },
     {
      "name": "model",
      "in": "query",
      "required": false,
      "description": "e.g. h100, h200, b200, ax102, advance-2",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "region",
      "in": "query",
      "required": false,
      "description": "us, eu or apac; filters quote-index series",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Benchmarks",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited: 30 reads a minute, 5 quote requests an hour per IP."
     }
    }
   }
  },
  "/api/v1/tco-scorecard": {
   "post": {
    "operationId": "calculate_36_month_tco",
    "summary": "36-month normalized cost of an incumbent SKU or of a full set of quotes",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "oneOf": [
         {
          "type": "object",
          "title": "Incumbent SKU",
          "required": [
           "incumbent_sku"
          ],
          "properties": {
           "incumbent_sku": {
            "type": "string",
            "description": "An id from /api/v1/repricing-2026, e.g. ovh-advance-2-2026 or hetzner-ax102-1"
           },
           "quantity": {
            "type": "integer",
            "minimum": 1,
            "default": 1
           },
           "egress_tb_per_month": {
            "type": "number",
            "minimum": 0
           },
           "extra_ipv4": {
            "type": "integer",
            "minimum": 0
           },
           "ipv4_monthly_each_usd": {
            "type": "number",
            "minimum": 0
           },
           "horizon_months": {
            "type": "integer",
            "minimum": 1,
            "maximum": 120,
            "default": 36
           },
           "annual_escalation_pct": {
            "type": "number",
            "default": 0
           },
           "eur_usd": {
            "type": "number",
            "description": "USD per EUR; defaults to the latest ECB reference rate"
           }
          }
         },
         {
          "type": "object",
          "title": "Full scorecard input",
          "required": [
           "scorecard"
          ],
          "properties": {
           "scorecard": {
            "type": "object",
            "description": "ScorecardInput as used by /tools/36-month-tco/: horizonMonths, fx, quotes[] (role incumbent|bid, units, pricing{base, unit, promo}, setupFeePerUnit, extraIPv4, egress, sla ...)"
           }
          }
         }
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Scorecard with line items, flags, 3-Yes badges and verdicts",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited: 30 reads a minute, 5 quote requests an hour per IP."
     }
    }
   }
  },
  "/api/v1/repricing-2026": {
   "get": {
    "operationId": "audit_2026_provider_repricing",
    "summary": "Hetzner and OVHcloud 2026 price changes, by SKU, with when to stay and when to switch",
    "parameters": [
     {
      "name": "provider",
      "in": "query",
      "required": false,
      "description": "hetzner or ovhcloud",
      "schema": {
       "type": "string",
       "enum": [
        "hetzner",
        "ovhcloud"
       ]
      }
     },
     {
      "name": "sku",
      "in": "query",
      "required": false,
      "description": "Optional SKU id or model, e.g. advance-2 or ax102",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Repricing facts",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited: 30 reads a minute, 5 quote requests an hour per IP."
     }
    }
   }
  },
  "/api/v1/quotes": {
   "post": {
    "operationId": "request_blind_counter_quotes",
    "summary": "Request 3+ blind counter-quotes. Confirmed by email before providers are contacted.",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "work_email",
         "category",
         "region"
        ],
        "properties": {
         "work_email": {
          "type": "string",
          "format": "email"
         },
         "name": {
          "type": "string"
         },
         "company": {
          "type": "string"
         },
         "category": {
          "type": "string",
          "enum": [
           "gpu",
           "dedicated",
           "colo",
           "vps"
          ]
         },
         "spec_summary": {
          "type": "string",
          "maxLength": 300
         },
         "gpu_model": {
          "type": "string",
          "enum": [
           "H100",
           "H200",
           "B200",
           "GB200",
           "A100",
           "L40S"
          ]
         },
         "gpu_count": {
          "type": "integer",
          "minimum": 1
         },
         "quantity": {
          "type": "integer",
          "minimum": 1
         },
         "region": {
          "type": "string",
          "enum": [
           "US",
           "Europe",
           "Asia-Pacific",
           "Any"
          ]
         },
         "term_months": {
          "type": "integer",
          "minimum": 0,
          "maximum": 60
         },
         "incumbent_provider": {
          "type": "string"
         },
         "incumbent_sku": {
          "type": "string"
         },
         "incumbent_monthly_usd": {
          "type": "number",
          "minimum": 0
         },
         "renewal_date": {
          "type": "string",
          "format": "date"
         },
         "monthly_budget_usd": {
          "type": "number",
          "minimum": 0
         },
         "notes": {
          "type": "string",
          "maxLength": 2000
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Reference number, route, indicative band and next step",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited: 30 reads a minute, 5 quote requests an hour per IP."
     }
    }
   }
  }
 }
}
