{"openapi":"3.0.3","info":{"title":"Token risk x402","version":"0.2.0","description":"Pre-trade token safety checks for AI agents on Solana and Base. Paid per call in x402 USDC, no API key.","contact":{"email":"hello@ogenalabs.com"}},"servers":[{"url":"https://api.ogenalabs.com/api/token-risk","description":"Production"},{"url":"https://token-risk-x402.parseen.workers.dev","description":"Development"}],"tags":[{"name":"token-risk","description":"Live paid endpoints."}],"paths":{"/v1/ping":{"post":{"summary":"Token safety ping","description":"Fast pre-trade safety boolean for one token. Returns safe true, false or null plus mint-authority and liquidity-lock flags. Costs $0.005 USDC per call. Price $0.005 USDC per call.","operationId":"check_token_safety_ping","tags":["token-risk"],"security":[{"paymentSignature":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chain":{"type":"string","enum":["solana","base"],"description":"Chain to screen ('solana' or 'base')."},"address":{"type":"string","description":"Token mint (Solana) or contract address (Base)."}},"required":["chain","address"]}}}},"responses":{"200":{"description":"Token safety ping result.","content":{"application/json":{"schema":{"type":"object","properties":{"safe":{"type":["boolean","null"]},"mintAuthorityOff":{"type":["boolean","null"]},"lpLocked":{"type":["boolean","null"]},"pairs":{"type":"number"},"fetchedAt":{"type":"integer","format":"int64"},"cacheHit":{"type":"boolean"}}}}}},"400":{"description":"Invalid request (a presented payment with invalid input also 400s).","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}}},"402":{"description":"Payment required. Challenge carries accepts[] plus a base64 PAYMENT-REQUIRED header.","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 v2 challenge JSON.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","required":["x402Version","error","resource","accepts"],"properties":{"x402Version":{"type":"integer","example":2},"error":{"type":"string","example":"Payment Required"},"resource":{"type":"object","properties":{"url":{"type":"string"},"description":{"type":"string"},"mimeType":{"type":"string"}}},"accepts":{"type":"array","items":{"type":"object","properties":{"scheme":{"type":"string","example":"exact"},"network":{"type":"string","example":"eip155:8453"},"amount":{"type":"string","example":"5000"},"asset":{"type":"string"},"payTo":{"type":"string"},"maxTimeoutSeconds":{"type":"integer"}}}},"preview":{"type":"object"}}}}}},"404":{"description":"No pools found for a paid request on an unknown token.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}}}}},"get":{"summary":"Token safety ping","description":"Fast pre-trade safety boolean for one token. Returns safe true, false or null plus mint-authority and liquidity-lock flags. Costs $0.005 USDC per call. Price $0.005 USDC per call.","operationId":"check_token_safety_ping","tags":["token-risk"],"security":[{"paymentSignature":[]}],"parameters":[{"name":"chain","in":"query","required":true,"schema":{"type":"string","enum":["solana","base"]}},{"name":"address","in":"query","required":true,"schema":{"type":"string"},"description":"Token mint (Solana) or contract address (Base)."}],"responses":{"200":{"description":"Token safety ping result.","content":{"application/json":{"schema":{"type":"object","properties":{"safe":{"type":["boolean","null"]},"mintAuthorityOff":{"type":["boolean","null"]},"lpLocked":{"type":["boolean","null"]},"pairs":{"type":"number"},"fetchedAt":{"type":"integer","format":"int64"},"cacheHit":{"type":"boolean"}}}}}},"400":{"description":"Invalid request (a presented payment with invalid input also 400s).","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}}},"402":{"description":"Payment required. Challenge carries accepts[] plus a base64 PAYMENT-REQUIRED header.","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 v2 challenge JSON.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","required":["x402Version","error","resource","accepts"],"properties":{"x402Version":{"type":"integer","example":2},"error":{"type":"string","example":"Payment Required"},"resource":{"type":"object","properties":{"url":{"type":"string"},"description":{"type":"string"},"mimeType":{"type":"string"}}},"accepts":{"type":"array","items":{"type":"object","properties":{"scheme":{"type":"string","example":"exact"},"network":{"type":"string","example":"eip155:8453"},"amount":{"type":"string","example":"5000"},"asset":{"type":"string"},"payTo":{"type":"string"},"maxTimeoutSeconds":{"type":"integer"}}}},"preview":{"type":"object"}}}}}},"404":{"description":"No pools found for a paid request on an unknown token.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}}}}}},"/v1/deep":{"post":{"summary":"Token risk deep report","description":"Full pre-trade risk report for one token: verdict, score, reasons, price, liquidity and HMAC attestation. Costs $0.04 USDC per call. First 3 calls per caller per day are free. Price $0.04 USDC per call.","operationId":"check_token_risk_deep","tags":["token-risk"],"security":[{"paymentSignature":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chain":{"type":"string","enum":["solana","base"],"description":"Chain to screen ('solana' or 'base')."},"address":{"type":"string","description":"Token mint (Solana) or contract address (Base)."}},"required":["chain","address"]}}}},"responses":{"200":{"description":"Token risk deep report result.","content":{"application/json":{"schema":{"type":"object","properties":{"verdict":{"type":"string"},"score":{"type":"number"},"reasons":{"type":"array"},"priceUsd":{"type":["number","null"]},"fetchedAt":{"type":"integer","format":"int64"},"cacheHit":{"type":"boolean"},"free":{"type":"boolean","description":"True while inside the daily free tier."},"attestation":{"type":"object","required":["digest","hmac"],"properties":{"digest":{"type":"string"},"hmac":{"type":"string"}}}}}}}},"400":{"description":"Invalid request (a presented payment with invalid input also 400s).","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}}},"402":{"description":"Payment required. First 3 calls per caller per day are free (stable x-client-id header). Challenge carries accepts[] plus a base64 PAYMENT-REQUIRED header.","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 v2 challenge JSON.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","required":["x402Version","error","resource","accepts"],"properties":{"x402Version":{"type":"integer","example":2},"error":{"type":"string","example":"Payment Required"},"resource":{"type":"object","properties":{"url":{"type":"string"},"description":{"type":"string"},"mimeType":{"type":"string"}}},"accepts":{"type":"array","items":{"type":"object","properties":{"scheme":{"type":"string","example":"exact"},"network":{"type":"string","example":"eip155:8453"},"amount":{"type":"string","example":"5000"},"asset":{"type":"string"},"payTo":{"type":"string"},"maxTimeoutSeconds":{"type":"integer"}}}},"preview":{"type":"object"}}}}}},"404":{"description":"No pools found for a paid request on an unknown token.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}}}}},"get":{"summary":"Token risk deep report","description":"Full pre-trade risk report for one token: verdict, score, reasons, price, liquidity and HMAC attestation. Costs $0.04 USDC per call. First 3 calls per caller per day are free. Price $0.04 USDC per call.","operationId":"check_token_risk_deep","tags":["token-risk"],"security":[{"paymentSignature":[]}],"parameters":[{"name":"chain","in":"query","required":true,"schema":{"type":"string","enum":["solana","base"]}},{"name":"address","in":"query","required":true,"schema":{"type":"string"},"description":"Token mint (Solana) or contract address (Base)."}],"responses":{"200":{"description":"Token risk deep report result.","content":{"application/json":{"schema":{"type":"object","properties":{"verdict":{"type":"string"},"score":{"type":"number"},"reasons":{"type":"array"},"priceUsd":{"type":["number","null"]},"fetchedAt":{"type":"integer","format":"int64"},"cacheHit":{"type":"boolean"},"free":{"type":"boolean","description":"True while inside the daily free tier."},"attestation":{"type":"object","required":["digest","hmac"],"properties":{"digest":{"type":"string"},"hmac":{"type":"string"}}}}}}}},"400":{"description":"Invalid request (a presented payment with invalid input also 400s).","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}}},"402":{"description":"Payment required. First 3 calls per caller per day are free (stable x-client-id header). Challenge carries accepts[] plus a base64 PAYMENT-REQUIRED header.","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 v2 challenge JSON.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","required":["x402Version","error","resource","accepts"],"properties":{"x402Version":{"type":"integer","example":2},"error":{"type":"string","example":"Payment Required"},"resource":{"type":"object","properties":{"url":{"type":"string"},"description":{"type":"string"},"mimeType":{"type":"string"}}},"accepts":{"type":"array","items":{"type":"object","properties":{"scheme":{"type":"string","example":"exact"},"network":{"type":"string","example":"eip155:8453"},"amount":{"type":"string","example":"5000"},"asset":{"type":"string"},"payTo":{"type":"string"},"maxTimeoutSeconds":{"type":"integer"}}}},"preview":{"type":"object"}}}}}},"404":{"description":"No pools found for a paid request on an unknown token.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}}}}}}},"components":{"securitySchemes":{"paymentSignature":{"type":"apiKey","in":"header","name":"payment-signature","description":"x402 v2 payment proof: POST unpaid, read the 402 accepts[], sign with a standard x402 client, retry with this header carrying the base64 PaymentPayload JSON."}},"schemas":{"Challenge":{"type":"object","required":["x402Version","error","resource","accepts"],"properties":{"x402Version":{"type":"integer","example":2},"error":{"type":"string","example":"Payment Required"},"resource":{"type":"object","properties":{"url":{"type":"string"},"description":{"type":"string"},"mimeType":{"type":"string"}}},"accepts":{"type":"array","items":{"type":"object","properties":{"scheme":{"type":"string","example":"exact"},"network":{"type":"string","example":"eip155:8453"},"amount":{"type":"string","example":"5000"},"asset":{"type":"string"},"payTo":{"type":"string"},"maxTimeoutSeconds":{"type":"integer"}}}},"preview":{"type":"object"}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}},"x-x402":{"asset":"USDC","networks":["eip155:8453","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"],"freeTier":{"product":"deep","callsPerDay":3,"header":"x-client-id"},"manifest":"https://api.ogenalabs.com/.well-known/x402","mcp":"https://api.ogenalabs.com/api/token-risk/mcp"}}