{"openapi":"3.1.0","info":{"title":"Prism402","version":"1.0.0","description":"OpenAI-compatible inference router. Every model behind one endpoint, paid per call over x402 in USDG on Robinhood Chain or USDC on Base.","x-guidance":"Prism402 routes OpenAI-style requests to many open models and charges per call via x402 in USDG on Robinhood Chain (eip155:4663) or USDC on Base (eip155:8453); the 402 lists both, sign for the one you hold. POST /v1/chat/completions with {model, messages, max_tokens}: the first response is a 402 quoting a ceiling (input plus max_tokens at the posted rate), pay it and retry, the unused part is owed back. POST /v1/embeddings works the same way and is billed exactly. POST /v1/scan with {address} returns a token risk score for a Robinhood Chain contract for a fixed $0.002. POST /v1/keys with {amount_usd} (1 to 1000) buys a prepaid API key so later calls skip per-call payment. List model ids with GET /models.","contact":{"email":"hello@prism402.com"}},"servers":[{"url":"https://prism402.com"}],"paths":{"/v1/chat/completions":{"post":{"operationId":"chat_completions","summary":"Chat completion on any listed model","tags":["Inference"],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0.000001","max":"1.000000"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string","description":"Model id from GET /models","example":"gpt-oss-20b"},"messages":{"type":"array","example":[{"role":"user","content":"Say hello in one word."}],"items":{"type":"object","properties":{"role":{"type":"string"},"content":{"type":"string"}},"required":["role","content"]}},"max_tokens":{"type":"integer","minimum":1,"description":"Output cap; the quoted ceiling is priced on it"}},"required":["model","messages"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","description":"OpenAI chat.completion object"}}}},"402":{"description":"Payment Required"}}}},"/v1/embeddings":{"post":{"operationId":"embeddings","summary":"Text embeddings","tags":["Inference"],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0.000001","max":"0.100000"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string","example":"bge-m3"},"input":{"example":"hello world","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},"required":["model","input"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","description":"OpenAI embeddings object"}}}},"402":{"description":"Payment Required"}}}},"/v1/scan":{"post":{"operationId":"token_scan","summary":"Trench Scan: contract facts, market data and risk score for a token","tags":["Scan"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string","description":"Token contract address (0x…)","example":"0x143185685456e50b88412D6cFC3a6f8D4Fd18afa"}},"required":["address"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","description":"Risk score with contract and market facts"}}}},"402":{"description":"Payment Required"}}}},"/v1/keys":{"post":{"operationId":"buy_prepaid_key","summary":"Deposit USDG for a prepaid API key","tags":["Keys"],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"1.000000","max":"1000.000000"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount_usd":{"type":"number","minimum":1,"maximum":1000,"description":"Deposit in USD (USDG or USDC)","example":1}},"required":["amount_usd"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","description":"Prepaid key and balance"}}}},"402":{"description":"Payment Required"}}}}}}