{
 "openapi": "3.1.0",
 "info": {
  "title": "AISchoolPro agent API",
  "version": "1.0.0",
  "description": "AI tutor, homework helper, test prep and essay grader. Free to start; Student plan $4.99/mo.",
  "contact": {
   "url": "https://aischoolpro.xyz/"
  }
 },
 "servers": [
  {
   "url": "https://aischoolpro.xyz"
  }
 ],
 "components": {
  "securitySchemes": {
   "apiKey": {
    "type": "apiKey",
    "in": "header",
    "name": "X-API-Key",
    "description": "Optional scoped key (company:read, pricing:read, search:read). Issue one at POST /agent-api/v1/keys."
   }
  }
 },
 "paths": {
  "/agent-api/v1/company": {
   "get": {
    "operationId": "getCompany",
    "summary": "Company profile and agent entry points",
    "security": [
     {},
     {
      "apiKey": []
     }
    ],
    "x-scope": "company:read",
    "x-free": true,
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "403": {
      "description": "key lacks the scope"
     },
     "429": {
      "description": "rate limited"
     }
    },
    "x-pricing": {
     "price_usd": 0,
     "metered": false,
     "note": "free; anonymous 30 req/min, key 300 req/min"
    }
   }
  },
  "/agent-api/v1/pricing": {
   "get": {
    "operationId": "getPricing",
    "summary": "Plans and USD prices",
    "security": [
     {},
     {
      "apiKey": []
     }
    ],
    "x-scope": "pricing:read",
    "x-free": true,
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "403": {
      "description": "key lacks the scope"
     },
     "429": {
      "description": "rate limited"
     }
    },
    "x-pricing": {
     "price_usd": 0,
     "metered": false,
     "note": "free; anonymous 30 req/min, key 300 req/min"
    }
   }
  },
  "/api/pricing": {
   "get": {
    "operationId": "apiPricing",
    "summary": "Plans and USD prices (plan, interval, amount_usd, currency, what_you_get)",
    "security": [
     {},
     {
      "apiKey": []
     }
    ],
    "x-scope": "pricing:read",
    "x-free": true,
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "403": {
      "description": "key lacks the scope"
     },
     "429": {
      "description": "rate limited"
     }
    },
    "x-pricing": {
     "price_usd": 0,
     "metered": false,
     "note": "free; anonymous 30 req/min, key 300 req/min"
    }
   }
  },
  "/agent-api/v1/search": {
   "get": {
    "operationId": "searchSite",
    "summary": "Search pages on this site",
    "security": [
     {},
     {
      "apiKey": []
     }
    ],
    "x-scope": "search:read",
    "x-free": true,
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "403": {
      "description": "key lacks the scope"
     },
     "429": {
      "description": "rate limited"
     }
    },
    "parameters": [
     {
      "name": "q",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "schema": {
       "type": "integer",
       "default": 5
      }
     }
    ],
    "x-pricing": {
     "price_usd": 0,
     "metered": false,
     "note": "free; anonymous 30 req/min, key 300 req/min"
    }
   }
  },
  "/agent-api/v1/keys": {
   "post": {
    "x-pricing": {
     "price_usd": 0,
     "metered": false,
     "note": "free; anonymous 30 req/min, key 300 req/min"
    },
    "operationId": "createKey",
    "summary": "Issue a scoped API key (shown once)",
    "security": [
     {}
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "scopes": {
          "type": "array",
          "items": {
           "type": "string",
           "enum": [
            "company:read",
            "pricing:read",
            "search:read"
           ]
          }
         },
         "label": {
          "type": "string"
         }
        }
       }
      }
     }
    },
    "responses": {
     "201": {
      "description": "key issued"
     },
     "429": {
      "description": "too many keys from this address"
     }
    }
   }
  },
  "/agent-api/v1/keys/me": {
   "get": {
    "x-pricing": {
     "price_usd": 0,
     "metered": false,
     "note": "free; anonymous 30 req/min, key 300 req/min"
    },
    "operationId": "getKey",
    "summary": "Scopes of the presented key",
    "security": [
     {
      "apiKey": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "missing or unknown key"
     }
    }
   }
  },
  "/mcp": {
   "post": {
    "x-pricing": {
     "price_usd": 0,
     "metered": false,
     "note": "free; anonymous 30 req/min, key 300 req/min"
    },
    "operationId": "mcp",
    "summary": "MCP streamable HTTP endpoint (JSON-RPC 2.0)",
    "security": [
     {},
     {
      "apiKey": []
     }
    ],
    "responses": {
     "200": {
      "description": "JSON-RPC response"
     }
    }
   }
  }
 }
}