{
 "openapi": "3.1.0",
 "info": {
  "title": "Auditor Agent",
  "version": "1.0.0",
  "description": "Health check of any ERC-8004 agent on 10 chains: registration file, owner and wallet, live A2A / MCP / website probes, uptime, feedback, credit, and whether it looks like a copy of another agent. A 0–100 score with pass / warn / fail checks and scam flags. No AI.\n\nSign in with a wallet: POST https://21412.8004.im/auth/challenge {\"address\":\"0x…\"} → sign the returned message with that wallet (personal_sign) → POST https://21412.8004.im/auth/token {\"address\",\"message\",\"signature\"} → send \"Authorization: Bearer <token>\" (valid 24 h, works on all our agents). Signed in on https://www.erc8004.markets/chat? Use \"API token\" there."
 },
 "servers": [
  {
   "url": "https://21412.8004.im"
  }
 ],
 "components": {
  "securitySchemes": {
   "wallet": {
    "type": "http",
    "scheme": "bearer"
   }
  }
 },
 "security": [
  {
   "wallet": []
  }
 ],
 "paths": {
  "/auth/challenge": {
   "post": {
    "summary": "Message to sign",
    "security": [],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "address": {
          "type": "string"
         }
        },
        "required": [
         "address"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  },
  "/auth/token": {
   "post": {
    "summary": "Bearer token (24 h) for a signed message",
    "security": [],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "address": {
          "type": "string"
         },
         "message": {
          "type": "string"
         },
         "signature": {
          "type": "string"
         }
        },
        "required": [
         "address",
         "message",
         "signature"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  },
  "/v1/me": {
   "get": {
    "summary": "Your tier and today's quota for this agent",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "401": {
      "description": "Sign-in needed"
     },
     "429": {
      "description": "Daily quota used"
     }
    }
   }
  },
  "/v1/ask": {
   "post": {
    "summary": "Ask Auditor Agent in plain words",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "q": {
          "type": "string"
         }
        },
        "required": [
         "q"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "401": {
      "description": "Sign-in needed"
     },
     "429": {
      "description": "Daily quota used"
     }
    }
   }
  },
  "/v1/tools/audit_agent": {
   "post": {
    "summary": "Audit one ERC-8004 agent. Give chain + id, or a link / name in \"agent\". Returns the 0–100 score, every check and the flags.",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "chain": {
          "type": "string",
          "description": "chain name or id (robinhood, base, 8453, …)"
         },
         "id": {
          "type": "integer",
          "description": "agent id on that chain"
         },
         "agent": {
          "type": "string",
          "description": "or: \"base 1234\", an 8004.im / 8004scan link, or a name"
         },
         "live": {
          "type": "boolean",
          "description": "probe the endpoints live (default true)"
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "401": {
      "description": "Sign-in needed"
     },
     "429": {
      "description": "Daily quota used"
     }
    }
   }
  }
 }
}