{"openapi":"3.1.0","info":{"title":"GEDX402 AI Search","version":"6","description":"Cited RAG answer — index URL(s), hybrid query, one payment.","contact":{"email":"jvalamis@gmail.com","url":"https://rag.gedx402.com"},"x-guidance":"Pay per request with USDC on Base via x402 v2 (Coinbase CDP facilitator). Choose any listed network in the 402 accepts[] response. 1 routes on this shard (competitive heroes default; ?full=1 for all). Full catalog: GET https://gedx402.com/v1/models Start here: POST /v1/aisearch/outcome/answer","x-service":{"serviceName":"GEDX402 AI Search","tags":["rag","ai-search","hybrid-search","mcp","agents","usdc","multi-chain"],"iconUrl":"https://rag.gedx402.com/favicon.svg"},"x-hub":"https://gedx402.com","x-payments":[{"x402":{"network":"eip155:8453","asset":"USDC","label":"Base"}}],"x-openapi-scope":"competitive","full_catalog":"https://rag.gedx402.com/openapi.json?full=1"},"servers":[{"url":"https://rag.gedx402.com"}],"paths":{"/v1/aisearch/outcome/answer":{"post":{"operationId":"aisearch_outcome_answer","summary":"Managed RAG Inference","description":"Single-hop RAG answer on rag.gedx402.com — one x402 payment indexes URL(s), runs hybrid retrieval, synthesizes a cited natural-language answer via chat/fast, and mints a prepaid session on the same instance_id. POST { url or urls[], question, budget?, top_k?, poll? }; budget.max_queries defaults to 5 (one query consumed for the answer; remainder for follow-ups on query_path with session_token). Returns session_token, query_path, and credits. x402 settlement USDC per request (see npm run pricing:report). Bundle hero: GET /v1/models?bundle=managed-rag.","tags":["RAG"],"security":[],"x-payment-info":{"protocols":[{"x402":{"network":"eip155:8453","asset":"USDC","label":"Base"}}],"price":{"mode":"dynamic","currency":"USD","min":"0.110000","max":"0.625000"}},"responses":{"200":{"description":"Inference result","content":{"application/json":{"schema":{"type":"object","properties":{"answer":{"type":"string","description":"Cited natural-language answer synthesized from retrieved chunks."},"citations":{"type":"array","description":"Numbered source passages used for synthesis.","items":{"type":"object","properties":{"index":{"type":"integer","description":"Citation number referenced inline in answer as [n]."},"url":{"type":"string","nullable":true},"snippet":{"type":"string"},"score":{"type":"number"}},"required":["index","snippet"]}},"session_id":{"type":"string","format":"uuid"},"session_token":{"type":"string","description":"Prepaid session token — send via X-AISearch-Session-Token on query_path for follow-ups without x402."},"instance_id":{"type":"string"},"cf_instance_id":{"type":"string"},"mcp_url":{"type":"string","format":"uri"},"mcp_path":{"type":"string"},"index_path":{"type":"string"},"query_path":{"type":"string"},"expires_at":{"type":"string","format":"date-time"},"budget":{"type":"object","properties":{"max_index_ops":{"type":"integer"},"max_queries":{"type":"integer"}}},"credits":{"type":"object","description":"Remaining prepaid index/query credits on the minted session.","properties":{"index_ops_remaining":{"type":"integer","minimum":0},"queries_remaining":{"type":"integer","minimum":0}},"required":["index_ops_remaining","queries_remaining"]},"instructions":{"type":"string"},"provenance":{"type":"object","description":"Response provenance — content digest, latency, optional on-chain settlement.","properties":{"fetched_at":{"type":"string","format":"date-time","description":"ISO-8601 response timestamp."},"content_sha256":{"type":"string","description":"SHA-256 hex digest of primary answer text."},"latency_ms":{"type":"integer","minimum":0,"description":"Wall-clock latency in milliseconds."},"settlement_tx":{"type":"string","description":"Optional on-chain x402 settlement transaction hash."}},"required":["fetched_at","content_sha256","latency_ms"]}},"required":["answer","citations","session_token","credits","provenance"]},"example":{"answer":"Configure AI Search by … [1]","citations":[{"index":1,"url":"https://example.com/docs","snippet":"…","score":0.92}],"session_id":"550e8400-e29b-41d4-a716-446655440000","session_token":"abc123…","instance_id":"ged-abc123","query_path":"/v1/aisearch/ged-abc123/query","credits":{"index_ops_remaining":0,"queries_remaining":4},"instructions":"Send session_token via X-AISearch-Session-Token header or body on query_path — no x402 until credits exhausted.","provenance":{"fetched_at":"2026-06-18T12:00:00.000Z","content_sha256":"a1b2c3d4e5f6789012345678901234567890abcd","latency_ms":2400}}}}},"400":{"description":"Invalid or over-limit payload"},"402":{"description":"Payment required (x402 v2 USDC on Base)","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 v2 PaymentRequired with accepts[] per network","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"Single public URL to fetch, index, and answer from."},"urls":{"type":"array","description":"One or more public URLs to index (max 5). Alternative to url.","items":{"type":"string"}},"question":{"type":"string","description":"Natural-language question to answer from indexed content."},"top_k":{"type":"integer","description":"Max retrieval chunks for synthesis (1-20, default 8)."},"retrieval_type":{"type":"string","enum":["hybrid","vector","keyword"]},"poll":{"type":"boolean","description":"Wait for each URL index to complete before query (default false)."},"rewrite_query":{"type":"boolean"},"rerank":{"type":"boolean"},"budget":{"type":"object","description":"Prepaid index/query credits included in the single x402 payment. Default max_queries: 5 (one consumed for the cited answer; remainder for follow-ups on query_path).","properties":{"max_index_ops":{"type":"integer","minimum":1,"maximum":32,"description":"Total prepaid index ops (defaults to url count)."},"max_queries":{"type":"integer","minimum":1,"maximum":64}}}},"required":["question"]},"example":{"url":"https://example.com/docs","question":"How do I configure AI Search?","budget":{"max_queries":5}}}}},"servers":[{"url":"https://rag.gedx402.com"}],"x-resource-url":"https://rag.gedx402.com/v1/aisearch/outcome/answer"}},"/v1/models":{"get":{"operationId":"models","summary":"Shard route catalog","description":"Free catalog for this shard with pricing and descriptions.","tags":["Catalog"],"security":[],"responses":{"200":{"description":"Catalog JSON"}}}},"/v1/demo":{"get":{"operationId":"demo_index","summary":"Response shape previews","description":"Free cached JSON examples (not charged).","tags":["Catalog"],"security":[],"responses":{"200":{"description":"Demo index"}}}},"/v1/health":{"get":{"operationId":"health","summary":"Service health","tags":["Catalog"],"security":[],"responses":{"200":{"description":"Health JSON"}}}}},"x-agentcash-guidance":{"llmsTxtUrl":"https://rag.gedx402.com/llms.txt"},"x-agentcash-provenance":{"ownershipProofs":["0xb3C2776cE3F99cb3366520c27b4aC5D436942Ab6","9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin"]},"x-discovery":{"ownershipProofs":["0xb3C2776cE3F99cb3366520c27b4aC5D436942Ab6","9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin"]}}