{
  "openapi": "3.1.0",
  "info": {
    "title": "rug-check-service",
    "version": "0.4",
    "description": "Solana token rug-check API. Factual checks from public data, not financial advice. The service never asks for a private key or seed phrase and never sends funds. Paid checks use HTTP 402 and are x402 v2 compatible (PAYMENT-REQUIRED / PAYMENT-SIGNATURE / PAYMENT-RESPONSE). Payments are self-verified on public Solana RPC after a transfer to the receive-only address with a memo.",
    "x-disclaimer": "These results are factual checks from public data sources, not financial advice. They are not a recommendation to buy, sell, or hold any token. Public data can be incomplete, cached, or wrong. Locked liquidity, revoked authorities, and holder percentages do not guarantee safety. Always do your own research.",
    "x-guidance": "Bots: GET /check/{mint} (JSON by default). If unpaid, you receive HTTP 402 with a PAYMENT-REQUIRED header and a JSON invoice (price, receive_address, memo, exact USDC/SOL amounts, expiry). Pay the exact amount on Solana mainnet to the receive-only address with that Memo text, then retry GET /check/{mint}?memo=<memo> or send a PAYMENT-SIGNATURE header. Free sample: GET /sample/{mint}. Bulk: GET /pay/bulk ($5 for 100) or GET /pay/bulk500 ($20 for 500), then GET /credits?memo=<memo> for a credit_code. MCP: POST /mcp (tools sample_check, rug_check). Docs: /docs, /llms.txt, /examples/python.py, /examples/client.js. Factual checks, not financial advice. The server never holds keys and never sends funds."
  },
  "servers": [
    {
      "url": "https://46-101-49-190.sslip.io"
    }
  ],
  "paths": {
    "/docs": {
      "get": {
        "summary": "Human documentation",
        "responses": {
          "200": {
            "description": "HTML docs"
          }
        },
        "security": []
      }
    },
    "/openapi.json": {
      "get": {
        "summary": "This OpenAPI document",
        "responses": {
          "200": {
            "description": "OpenAPI 3.1 JSON"
          }
        },
        "security": []
      }
    },
    "/llms.txt": {
      "get": {
        "summary": "LLM-oriented description of the API",
        "responses": {
          "200": {
            "description": "text/plain"
          }
        },
        "security": []
      }
    },
    "/health": {
      "get": {
        "summary": "Liveness",
        "responses": {
          "200": {
            "description": "ok"
          }
        },
        "security": []
      }
    },
    "/sample/{mint}": {
      "get": {
        "summary": "Free sample check (always ungated)",
        "parameters": [
          {
            "name": "mint",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Rug-check report (JSON by default)"
          }
        },
        "security": []
      }
    },
    "/pay/{mint}": {
      "get": {
        "summary": "Invoice for one $0.25 check",
        "parameters": [
          {
            "name": "mint",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Memo, exact USDC/SOL amounts, expiry, receive address"
          }
        },
        "security": []
      }
    },
    "/pay/bulk": {
      "get": {
        "summary": "Invoice for a $5 pack of 100 checks",
        "responses": {
          "200": {
            "description": "Bulk memo, exact amounts, expiry"
          }
        },
        "security": []
      }
    },
    "/pay/bulk500": {
      "get": {
        "summary": "Invoice for a $20 pack of 500 checks",
        "responses": {
          "200": {
            "description": "Bulk memo, exact amounts, expiry"
          }
        },
        "security": []
      }
    },
    "/mcp": {
      "post": {
        "summary": "MCP Streamable HTTP (JSON-RPC 2.0)",
        "description": "Tools: sample_check (free), rug_check ($0.25 or bulk credit; returns payment instructions when unpaid). Never holds keys.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC result"
          },
          "202": {
            "description": "Notification acknowledged"
          }
        },
        "security": []
      },
      "get": {
        "summary": "MCP endpoint description",
        "responses": {
          "200": {
            "description": "JSON description of the MCP endpoint"
          }
        },
        "security": []
      }
    },
    "/credits": {
      "get": {
        "summary": "Redeem a confirmed bulk payment or inspect a credit balance",
        "parameters": [
          {
            "name": "memo",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "credit",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "credit_code and remaining checks"
          },
          "402": {
            "description": "Bulk payment not yet verified"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "5.000000"
          },
          "protocols": [
            {
              "x402": {
                "version": 2,
                "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"
              }
            }
          ],
          "notes": "Only if redeeming an unpaid bulk memo. Already-paid memos and credit lookups return 200."
        }
      }
    },
    "/check/{mint}": {
      "get": {
        "summary": "Paid token check. Returns 402 when unpaid.",
        "parameters": [
          {
            "name": "mint",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "memo",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Invoice memo from /pay or a prior 402"
          },
          {
            "name": "signature",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Confirmed Solana transaction signature"
          },
          {
            "name": "credit",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Bulk credit code"
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "text"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Check report JSON; PAYMENT-RESPONSE header on paid success"
          },
          "402": {
            "description": "Payment required. JSON body plus PAYMENT-REQUIRED header (x402 v2).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "price_usd": {
                      "type": "number"
                    },
                    "accepted_assets": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "receive_address": {
                      "type": "string"
                    },
                    "memo": {
                      "type": "string"
                    },
                    "expires_at": {
                      "type": "string"
                    },
                    "usdc_raw_required": {
                      "type": "integer"
                    },
                    "sol_lamports": {
                      "type": "integer"
                    },
                    "how_to_retry": {
                      "type": "string"
                    },
                    "x402": {
                      "type": "object"
                    },
                    "bulk": {
                      "type": "object"
                    },
                    "disclaimer": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.250000"
          },
          "protocols": [
            {
              "x402": {
                "version": 2,
                "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"
              }
            }
          ],
          "notes": "Self-verified transfer-then-prove on Solana mainnet (USDC or native SOL). No facilitator keys."
        }
      }
    },
    "/stats": {
      "get": {
        "summary": "Factual checks-served and verified income (never fabricated)",
        "responses": {
          "200": {
            "description": "Stats JSON or text"
          }
        },
        "security": []
      }
    }
  }
}
