{
 "openapi": "3.1.0",
 "info": {
  "title": "What Can I Run AI? API",
  "version": "1.0.0",
  "description": "Which open LLMs fit on which GPU, Mac or mini PC: memory need, fit verdict, tokens/sec estimates, cheapest hardware. No auth. Docs: https://whatcanirunai.vercel.app/developers/",
  "contact": {
   "email": "novpax@mail.grokbot.com",
   "url": "https://whatcanirunai.vercel.app/contact/"
  }
 },
 "servers": [
  {
   "url": "https://whatcanirunai.vercel.app"
  }
 ],
 "paths": {
  "/api/v1/models.json": {
   "get": {
    "operationId": "listModels",
    "summary": "All tracked models",
    "responses": {
     "200": {
      "description": "Models",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Bad parameters",
      "content": {
       "application/problem+json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  },
  "/api/v1/hardware.json": {
   "get": {
    "operationId": "listHardware",
    "summary": "All tracked devices",
    "responses": {
     "200": {
      "description": "Hardware",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Bad parameters",
      "content": {
       "application/problem+json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  },
  "/api/v1/fit": {
   "get": {
    "operationId": "fit",
    "summary": "Does a model fit on a device? Memory need, verdict and tok/s range.",
    "parameters": [
     {
      "name": "model",
      "in": "query",
      "required": true,
      "description": "Model id",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "hardware",
      "in": "query",
      "required": true,
      "description": "Hardware id",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "quant",
      "in": "query",
      "required": false,
      "description": "Q4 (default), Q8 or FP16",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Fit result",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Bad parameters",
      "content": {
       "application/problem+json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  },
  "/api/v1/what-runs": {
   "get": {
    "operationId": "whatRuns",
    "summary": "Every tracked model on one device, with verdicts at Q4/Q8/FP16.",
    "parameters": [
     {
      "name": "hardware",
      "in": "query",
      "required": true,
      "description": "Hardware id",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Models on device",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Bad parameters",
      "content": {
       "application/problem+json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  },
  "/api/v1/recommend": {
   "get": {
    "operationId": "recommend",
    "summary": "Cheapest devices (list price) that run a model, ranked, with optional budget cap and speed floor. x402-payable when enabled.",
    "parameters": [
     {
      "name": "model",
      "in": "query",
      "required": true,
      "description": "Model id",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "quant",
      "in": "query",
      "required": false,
      "description": "Q4/Q8/FP16",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "budget",
      "in": "query",
      "required": false,
      "description": "Max list price USD",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "min_tps",
      "in": "query",
      "required": false,
      "description": "Min tokens/sec (upper estimate)",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Ranked devices",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Bad parameters",
      "content": {
       "application/problem+json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "402": {
      "description": "x402 payment required (PAYMENT-REQUIRED header)"
     }
    }
   }
  },
  "/api/v1/matrix": {
   "get": {
    "operationId": "matrix",
    "summary": "Full model x hardware fit matrix at one quant (all verdicts and tok/s ranges). x402-payable when enabled.",
    "parameters": [
     {
      "name": "quant",
      "in": "query",
      "required": false,
      "description": "Q4/Q8/FP16",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Matrix",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Bad parameters",
      "content": {
       "application/problem+json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "402": {
      "description": "x402 payment required"
     }
    }
   }
  }
 }
}