{
  "openapi": "3.0.3",
  "info": {
    "title": "token-dd - one-call token due diligence",
    "version": "1.0.0",
    "description": "Free preflight, then a paid full report in one call: DexScreener market/pool data, GoPlus security and holder concentration, and chain RPC contract checks, joined into a scored risk assessment with explicit source status. Informational only; not financial advice."
  },
  "servers": [{"url": "https://api.firstmention.uk/s/token-dd"}],
  "paths": {
    "/check": {
      "get": {
        "summary": "Paid token due-diligence report ($0.01)",
        "operationId": "checkToken",
        "parameters": [
          {"name": "chain", "in": "query", "required": true, "schema": {"type": "string", "enum": ["base", "ethereum", "bsc", "arbitrum"]}},
          {"name": "address", "in": "query", "required": true, "schema": {"type": "string", "description": "0x-prefixed 40-hex token contract address"}}
        ],
        "responses": {
          "200": {"description": "Joined report with assessment and source_status"},
          "400": {"description": "Invalid input"},
          "402": {"description": "Payment required (x402, USDC on Base)"}
        }
      }
    },
    "/preflight": {
      "get": {
        "summary": "Free input validation",
        "operationId": "preflight",
        "parameters": [
          {"name": "chain", "in": "query", "required": true, "schema": {"type": "string", "enum": ["base", "ethereum", "bsc", "arbitrum"]}},
          {"name": "address", "in": "query", "required": true, "schema": {"type": "string"}}
        ],
        "responses": {"200": {"description": "valid"}, "400": {"description": "invalid"}}
      }
    },
    "/health": {"get": {"summary": "liveness", "operationId": "health", "responses": {"200": {"description": "ok"}}}}
  }
}