{
  "openapi": "3.1.0",
  "info": {
    "title": "NoJunk Token Check",
    "version": "1.0.0",
    "description": "Crypto token junk/rug-risk check for Base, Ethereum, BNB Chain, Arbitrum, Polygon, Optimism, Avalanche and Solana tokens. Send a token contract address (0x... with chain, defaults to Base; or a Solana mint); get a grade (JUNK, RISKY, CAUTION, CLEAN), a 0-100 risk score, specific red and green flags (honeypot, sell tax, mint/freeze authority, owner powers, holder concentration, liquidity, pool age) and market stats. Not financial advice.",
    "x-guidance": "POST /check with JSON {\"tokenAddress\": \"<Base 0x address or Solana mint>\", \"chain\": one of base, ethereum, bsc, arbitrum, polygon, optimism, avalanche, solana (optional; 0x defaults to base)} or GET /check?tokenAddress=...&chain=... to get a junk/rug-risk grade (JUNK, RISKY, CAUTION, CLEAN), a 0-100 risk score, red/green flags and market stats. $0.01 USDC on Base per check via x402. Invalid addresses and tokens with no data are rejected before payment is settled. Not financial advice."
  },
  "servers": [
    {
      "url": "https://nojunk-token-check.mick8511.workers.dev"
    }
  ],
  "paths": {
    "/sample": {
      "get": {
        "operationId": "sampleTokenCheck",
        "summary": "Free cached example report (BRETT on Base); no payment",
        "tags": [
          "Crypto",
          "Security"
        ],
        "responses": {
          "200": {
            "description": "Example request and report"
          }
        }
      }
    },
    "/check": {
      "post": {
        "operationId": "checkToken",
        "summary": "Grade a token on Base, Ethereum, BNB Chain, Arbitrum, Polygon, Optimism, Avalanche or Solana for junk/rug risk",
        "tags": [
          "Crypto",
          "Security"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.010000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tokenAddress": {
                    "type": "string",
                    "minLength": 32,
                    "description": "Token contract address (Base 0x...) or Solana mint address"
                  },
                  "chain": {
                    "type": "string",
                    "enum": [
                      "base",
                      "ethereum",
                      "bsc",
                      "arbitrum",
                      "polygon",
                      "optimism",
                      "avalanche",
                      "solana"
                    ],
                    "description": "Optional; 0x addresses default to base, Solana mints are auto-detected"
                  }
                },
                "required": [
                  "tokenAddress"
                ]
              },
              "example": {
                "tokenAddress": "0x532f27101965dd16442E59d40670FaF5eBB142E4",
                "chain": "base"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Risk report",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "token": {
                      "type": "object"
                    },
                    "grade": {
                      "type": "string",
                      "enum": [
                        "JUNK",
                        "RISKY",
                        "CAUTION",
                        "CLEAN"
                      ]
                    },
                    "risk_score": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 100
                    },
                    "one_liner": {
                      "type": "string"
                    },
                    "red_flags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "severity": {
                            "type": "string"
                          },
                          "flag": {
                            "type": "string"
                          },
                          "detail": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "green_flags": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "market": {
                      "type": "object"
                    },
                    "disclaimer": {
                      "type": "string"
                    },
                    "sources": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "grade",
                    "risk_score",
                    "red_flags"
                  ]
                },
                "example": {
                  "token": {
                    "chain": "base",
                    "address": "0x532f27101965dd16442E59d40670FaF5eBB142E4",
                    "name": "Brett",
                    "symbol": "BRETT",
                    "holders": 908869
                  },
                  "grade": "CLEAN",
                  "risk_score": 0,
                  "one_liner": "BRETT: no major red flags found.",
                  "red_flags": [],
                  "green_flags": [
                    "Ownership renounced or no owner.",
                    "Contract source is verified."
                  ],
                  "market": {
                    "price_usd": 0.01,
                    "liquidity_usd": 5000000,
                    "volume_24h_usd": 1000000,
                    "oldest_pool_age_days": 900
                  },
                  "disclaimer": "Automated risk screen for information and entertainment only. Not financial, investment or trading advice. Data can be wrong or stale; always do your own research."
                }
              }
            }
          },
          "402": {
            "description": "Payment Required (x402 v2 challenge in the PAYMENT-REQUIRED header)"
          }
        }
      },
      "get": {
        "operationId": "checkTokenGet",
        "summary": "Grade a token on Base, Ethereum, BNB Chain, Arbitrum, Polygon, Optimism, Avalanche or Solana for junk/rug risk",
        "tags": [
          "Crypto",
          "Security"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.010000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "parameters": [
          {
            "name": "tokenAddress",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Token contract address (Base 0x...) or Solana mint address"
          },
          {
            "name": "chain",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "base",
                "ethereum",
                "bsc",
                "arbitrum",
                "polygon",
                "optimism",
                "avalanche",
                "solana"
              ]
            },
            "description": "Optional; 0x addresses default to base, Solana mints are auto-detected"
          }
        ],
        "responses": {
          "200": {
            "description": "Risk report",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "token": {
                      "type": "object"
                    },
                    "grade": {
                      "type": "string",
                      "enum": [
                        "JUNK",
                        "RISKY",
                        "CAUTION",
                        "CLEAN"
                      ]
                    },
                    "risk_score": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 100
                    },
                    "one_liner": {
                      "type": "string"
                    },
                    "red_flags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "severity": {
                            "type": "string"
                          },
                          "flag": {
                            "type": "string"
                          },
                          "detail": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "green_flags": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "market": {
                      "type": "object"
                    },
                    "disclaimer": {
                      "type": "string"
                    },
                    "sources": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "grade",
                    "risk_score",
                    "red_flags"
                  ]
                },
                "example": {
                  "token": {
                    "chain": "base",
                    "address": "0x532f27101965dd16442E59d40670FaF5eBB142E4",
                    "name": "Brett",
                    "symbol": "BRETT",
                    "holders": 908869
                  },
                  "grade": "CLEAN",
                  "risk_score": 0,
                  "one_liner": "BRETT: no major red flags found.",
                  "red_flags": [],
                  "green_flags": [
                    "Ownership renounced or no owner.",
                    "Contract source is verified."
                  ],
                  "market": {
                    "price_usd": 0.01,
                    "liquidity_usd": 5000000,
                    "volume_24h_usd": 1000000,
                    "oldest_pool_age_days": 900
                  },
                  "disclaimer": "Automated risk screen for information and entertainment only. Not financial, investment or trading advice. Data can be wrong or stale; always do your own research."
                }
              }
            }
          },
          "402": {
            "description": "Payment Required (x402 v2 challenge in the PAYMENT-REQUIRED header)"
          }
        }
      }
    }
  }
}