{
 "openapi": "3.1.0",
 "info": {
  "title": "Empire Security API",
  "version": "1.1.0",
  "description": "Free, read-only checks. Paid plans unlock scheduled runs."
 },
 "servers": [
  {
   "url": "https://security.eliteaiempire.com"
  }
 ],
 "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"
    }
   }
  },
  "/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": {
    "operationId": "mcp",
    "summary": "Model Context Protocol, streamable HTTP with JSON responses",
    "responses": {
     "200": {
      "description": "JSON-RPC 2.0 response"
     },
     "202": {
      "description": "Notification accepted"
     }
    }
   }
  },
  "/api/scan_domain": {
   "get": {
    "operationId": "scan_domain",
    "summary": "Passive scan of a public domain",
    "x-pricing": {
     "model": "free",
     "currency": "USD",
     "amount": 0
    },
    "parameters": [
     {
      "name": "domain",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string",
       "example": "example.com"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Result",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Result"
        }
       }
      }
     },
     "400": {
      "description": "Input refused",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited"
     }
    }
   }
  },
  "/free/{module}": {
   "post": {
    "operationId": "free_check",
    "summary": "Free first result for one module, rendered as HTML",
    "parameters": [
     {
      "name": "module",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "enum": [
        "auth",
        "awareness",
        "backup",
        "cloud",
        "code",
        "dast",
        "email",
        "evidence",
        "exposure",
        "home",
        "logs",
        "scan",
        "secrets",
        "upload",
        "vulnintel"
       ]
      }
     }
    ],
    "requestBody": {
     "content": {
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "value": {
          "type": "string"
         },
         "file": {
          "type": "string",
          "format": "binary"
         },
         "sample": {
          "type": "string"
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "HTML result page"
     },
     "400": {
      "description": "Input refused, HTML page with the reason"
     },
     "429": {
      "description": "Rate limited"
     }
    }
   }
  },
  "/api/insurance_pack": {
   "get": {
    "operationId": "insurance_pack",
    "summary": "Cyber-insurance questionnaire pack from a passive scan",
    "x-pricing": {
     "model": "free",
     "currency": "USD",
     "amount": 0
    },
    "parameters": [
     {
      "name": "domain",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string",
       "example": "example.com"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Pack"
     },
     "400": {
      "description": "Input refused",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited"
     }
    }
   }
  },
  "/api/partner/v1/clients": {
   "get": {
    "operationId": "partner_clients",
    "summary": "Partner client list (Bearer partner or sandbox key)",
    "responses": {
     "200": {
      "description": "Clients"
     },
     "401": {
      "description": "Missing or expired key"
     }
    }
   }
  },
  "/api/partner/v1/clients/{id}/{resource}": {
   "get": {
    "operationId": "partner_client_resource",
    "summary": "report, insurance-pack or qbr for one client (Bearer key)",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "resource",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "enum": [
        "report",
        "insurance-pack",
        "qbr"
       ]
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Resource"
     },
     "401": {
      "description": "Missing or expired key"
     },
     "404": {
      "description": "Unknown client"
     }
    }
   }
  }
 },
 "components": {
  "schemas": {
   "Error": {
    "type": "object",
    "properties": {
     "error": {
      "type": "object",
      "properties": {
       "code": {
        "type": "string"
       },
       "message": {
        "type": "string"
       }
      }
     }
    }
   },
   "Result": {
    "type": "object",
    "properties": {
     "module": {
      "type": "string"
     },
     "target": {
      "type": "string"
     },
     "score": {
      "type": [
       "integer",
       "null"
      ]
     },
     "summary": {
      "type": "string"
     },
     "rows": {
      "type": "array",
      "items": {
       "type": "object"
      }
     }
    }
   }
  },
  "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."
   }
  }
 },
 "x-f7455-augmented": "agent endpoints + optional scoped API keys added by the F7455 agent surface"
}