{"openapi":"3.1.0","info":{"title":"CarsonBot402 API","version":"1.0.0","description":"Carson Roscoe works on CDP at Coinbase and helped incubate x402 in its early days. CarsonBot402 is his bot: GitHub maintenance for x402-foundation/x402, plus x402 Q&A with citations and a scheme visualizer on this site.","x-guidance":"Pay with x402 on POST /api/ask (exact USDC on Base or Solana mainnet). Unpaid POST returns HTTP 402 with PAYMENT-REQUIRED and Bazaar input/output schemas; each payment authorizes one isolated request. The site's protected-page Authorization token is for the human UI and is not an agent API credential. Call GET /api/health before paying when availability matters. Streamable HTTP MCP lives at /mcp/connect (tools ask_anything_x402, ask_anything_x402_raw). Machine-readable discovery: /openapi.json, /.well-known/x402, /.well-known/api-catalog, /llms.txt.","x-api-version":"1.0.0","x-api-versioning-policy":"v1 (this document): unversioned paths (/api/ask). Breaking HTTP or schema changes will ship under /v2/… with at least 90 days notice in OpenAPI info.version and llms.txt. Deprecated routes will respond with Deprecation and Sunset headers.","contact":{"email":"carsonbot402@gmail.com"}},"servers":[{"url":"https://www.carsonbot402.dev"}],"paths":{"/api/ask":{"post":{"operationId":"askQuestion","summary":"x402 Q&A with citations","description":"x402 debugging/troubleshooting Q&A: Ask any question, get a cited answer. Whether you need HTTP 402 Payment Required help, facilitator verify & settle (CDP @coinbase/cdp-sdk), Bazaar discovery metadata & listing, protocol documentation, Next.js paid routes, or planning, building, and integrating x402 servers: @x402/core @x402/next @x402/express @x402/hono @x402/fastify @x402/fetch @x402/axios @x402/mcp; Gin; FastAPI/Flask. Base & Solana USDC.","tags":["Ask","x402","AI"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"question":{"type":"string","minLength":1,"maxLength":2000,"description":"Natural-language x402 question (debugging, troubleshooting, protocol, facilitator verify/settle, Bazaar listing, integrations)."},"audience":{"type":"string","description":"Optional RAG tag filter: audience dimension (see config/rag-tag-vocabulary)."},"contentType":{"type":"string","description":"Optional RAG tag filter: content-type dimension (guides, reference, etc.)."}},"required":["question"],"additionalProperties":false}}}},"responses":{"200":{"description":"Cited answer; payment settles only after this successful response","content":{"application/json":{"schema":{"type":"object","properties":{"answer":{"type":"string","description":"Cited prose answer grounded in indexed x402 docs and examples."},"citations":{"type":"array","description":"Source snippets referenced by bracket markers in answer.","items":{"type":"object","properties":{"label":{"type":"string"},"path":{"type":"string"},"url":{"type":"string"},"startLine":{"type":"number"},"endLine":{"type":"number"}},"required":["label","path","url","startLine","endLine"]}},"citationMap":{"type":"object","description":"Maps answer footnote keys to citations[] indexes.","additionalProperties":{"type":"object","properties":{"citationIndex":{"type":"number"}},"required":["citationIndex"]}},"requestId":{"type":"string","description":"Internal ask interaction id (req_ prefix), not a model provider id."}},"required":["answer","citations","citationMap","requestId"]}}}},"400":{"description":"Invalid request (malformed JSON or missing fields)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"402":{"description":"Payment Required (x402 v2 PAYMENT-REQUIRED header)"},"404":{"description":"Unknown API route","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the client may retry"},"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Maximum requests allowed in the current window"},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Remaining requests in the current window"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"Unexpected server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"502":{"description":"Answer generation failed; verified payment is cancelled and not settled"},"503":{"description":"Search index unavailable; verified payment is cancelled and not settled"}}}},"/api/health":{"get":{"operationId":"healthCheck","summary":"Health check","security":[],"responses":{"200":{"description":"Service is up","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"name":{"type":"string"}},"required":["status","name"]}}}},"400":{"description":"Invalid request (malformed JSON or missing fields)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Unknown API route","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the client may retry"},"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Maximum requests allowed in the current window"},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Remaining requests in the current window"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"Unexpected server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}},"x-discovery":{"ownershipProofs":["0x20fd1756ba28dd0910027e285daa299c4f588599ded818772c6e246e9517e26077344e0bbdd3ac3a77a9b0a1a555dc38a1f03c44ec0727460d75be03a7daae501c","2Ki6iLfE29yiDwBMYSThVHz3ENK7FA5KVqU4cgVUNfMme7XcnSQKiC32J6viBmPWDLDEzbnaSyYSX99iaB47uuV7"]},"components":{"schemas":{"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"code":{"type":"string"},"instance":{"type":"string"},"resolution":{"type":"string"}},"required":["type","title","status","detail","code"]}}}}