{"openapi":"3.0.3","info":{"title":"x402-apis","version":"1.0.0","description":"Pay-per-request AI chat. No accounts, no API keys — pay per request with USDC on Base via x402 (HTTP 402). Payment: send a request; on 402 follow the PAYMENT-REQUIRED header with an x402 client.","contact":{"email":"contact@x402-apis.dev"},"x-payment":{"scheme":"exact","network":"eip155:8453","currency":"USD","amount":"$0.001","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x25a47702b2852D82F4cc6DF13a7343213d9a2ECa"},"x-guidance":"Pay-per-request AI chat. POST /api/chat costs $0.001 USDC on eip155:8453 per request via x402: send a normal request, and if you receive HTTP 402 with a PAYMENT-REQUIRED header, pay with an x402 client (@x402/fetch etc.) and retry. No API keys. Public metadata endpoints (/, /models, /stats, /llms.txt, /openapi.json) are free."},"servers":[{"url":"https://x402-apis.archlinuxonthinkpad.workers.dev"}],"paths":{"/":{"get":{"summary":"Service manifest","security":[],"responses":{"200":{"description":"JSON manifest"}}}},"/models":{"get":{"summary":"List models and price","security":[],"responses":{"200":{"description":"Model catalog"}}}},"/stats":{"get":{"summary":"Usage and settled revenue","security":[],"responses":{"200":{"description":"Revenue stats"}}}},"/api/chat":{"post":{"summary":"AI chat completion (paid)","description":"Send messages, get an LLM reply. Costs $0.001 USDC on eip155:8453 per request, collected via x402.","x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.001"}},"x-x402":{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x25a47702b2852D82F4cc6DF13a7343213d9a2ECa","amountAtomic":"1000"},"extensions":{"bazaar":{"schema":{"properties":{"input":{"type":"object","properties":{"model":{"type":"string","description":"Model alias (optional); default llama3.1-8b"},"messages":{"type":"array","minItems":1,"description":"Chat messages","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant","system"]},"content":{"type":"string"}},"required":["role","content"]}},"stream":{"type":"boolean","description":"Must be false (not supported yet)"}},"required":["messages"]},"output":{"type":"object","properties":{"id":{"type":"string"},"model":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"finish_reason":{"type":"string"},"message":{"type":"object","properties":{"role":{"type":"string"},"content":{"type":"string"}},"required":["role","content"]}}}},"usage":{"type":"object","properties":{"price":{"type":"string"}}}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string","description":"Model alias, e.g. llama3.1-8b (optional)"},"messages":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant","system"]},"content":{"type":"string"}},"required":["role","content"]}},"stream":{"type":"boolean","description":"Must be false (not supported yet)"}},"required":["messages"]}}}},"responses":{"200":{"description":"OpenAI-style chat completion"},"400":{"description":"Invalid JSON / no messages / bad message shape"},"402":{"description":"Payment required. Retry with an x402 payment signature (see PAYMENT-REQUIRED header).","headers":{"payment-required":{"description":"Base64 x402 v2 payment requirements","schema":{"type":"string"}}}},"501":{"description":"streaming_not_supported"},"502":{"description":"ai_error"}}}}}}