{"openapi":"3.1.0","info":{"title":"RugShield x402 Risk API","description":"Pay-per-call Solana safety checks for AI agents over x402 (USDC on Base or Solana).","version":"1.0"},"paths":{"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[]}},"/llms.txt":{"get":{"summary":"Llms Txt","operationId":"llms_txt_llms_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}},"security":[]}},"/v1/advisors":{"get":{"summary":"List the risk advisors, their prices and measured track records (free)","operationId":"listRiskAdvisors","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[]}},"/v1/token-risk/{address}":{"get":{"summary":"Solana token rug check for a pump.fun token before buying (paid, x402)","description":"Solana token rug check for pump.fun tokens before buying (is this token safe / rug pull risk): advisory flags, each with its measured precision. SNIPER_FEE_FINGERPRINT: recent txs paid fees used by known sniper clusters (100% precision, 80 rugs + 80 healthy). FACTORY_DEPLOYER: creator launched 10,000+ tokens with <=2% graduating (88.9% precision). Returns RISK_FLAGS or NO_FLAGS; NO_FLAGS does not mean safe. Input: token mint (base58).","operationId":"getSolanaTokenRugRisk","parameters":[{"name":"address","in":"path","required":true,"schema":{"type":"string","title":"Address"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"402":{"description":"Payment Required: x402 challenge with the exact price (USDC on Base or Solana)"}},"x-payment-info":{"protocols":["x402"],"price":{"currency":"USD","mode":"fixed","amount":"0.01"}}}},"/v1/jobs/{job_id}":{"get":{"summary":"Result of a queued paid call (free; the id is returned with HTTP 202)","operationId":"getJobResult","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/v1/jobs/{job_id}/retry":{"post":{"summary":"Run a failed paid job again (free; only for jobs that failed)","operationId":"retryJob","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/v1/risk-panel/{mint}":{"get":{"summary":"Paid multi-advisor risk panel for a Solana token with consensus and track records (x402)","description":"Solana token risk panel (is this token safe? rug check consensus): we pay several independent x402 risk APIs in parallel and return each verdict normalized 0-1, a consensus and each advisor's measured hit rate on our traffic (tokens labeled 24 h later). Pick advisors with ?advisors=a,b (free list: GET /v1/advisors); price = advisor cost + max(US$ 0.005, 15% of advisor cost). Not charged when no advisor answers; pay with x402 upto on Base and you are charged only for advisors that answer.","operationId":"getSolanaTokenRiskPanel","parameters":[{"name":"mint","in":"path","required":true,"schema":{"type":"string","title":"Mint"}},{"name":"advisors","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Advisors"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"402":{"description":"Payment Required: x402 challenge with the exact price (USDC on Base or Solana)"}},"x-payment-info":{"protocols":["x402"],"price":{"currency":"USD","mode":"dynamic","min":"0.010","max":"0.060950"}}}},"/v1/tx-guard":{"post":{"summary":"Check a Solana transaction before signing: ALLOW, WARN or BLOCK with balance changes (x402)","description":"Solana transaction safety check before signing (pre-sign guard, wallet drainer detection). Send the unsigned tx as base64; we simulate it on mainnet and return ALLOW, WARN or BLOCK with exact SOL and token balance changes and why: owner reassigned, unlimited approval, account closed to a third party, Token-2022 permanent delegate, SOL outflow above intent, swap output redirected. Solana only. 1,132 mainnet cases: 100% of attacks blocked, 0.13% false blocks, p95 1.0 s.","operationId":"checkSolanaTransactionBeforeSigning","requestBody":{"content":{"application/json":{"schema":{"properties":{"transaction":{"type":"string","maxLength":2000,"description":"Unsigned Solana transaction (legacy or v0), base64-encoded."},"signer":{"type":"string","description":"Base58 wallet that will sign; defaults to the transaction's fee payer."},"intent":{"properties":{"max_sol_out":{"type":"number","description":"Most SOL the signer may lose."},"expected_mints_in":{"items":{"type":"string"},"type":"array","description":"Token mints the signer expects to receive."},"allowed_recipients":{"items":{"type":"string"},"type":"array","description":"Addresses allowed to receive the signer's funds."}},"type":"object","description":"Optional: what the signer expects this transaction to do."}},"type":"object","required":["transaction"]}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"402":{"description":"Payment Required: x402 challenge with the exact price (USDC on Base or Solana)"}},"x-payment-info":{"protocols":["x402"],"price":{"currency":"USD","mode":"fixed","amount":"0.01"}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}