{"openapi":"3.1.0","info":{"title":"GEDX402 AI Search","version":"6","description":"Cited RAG answer \u2014 index URL(s), hybrid query, one payment.","contact":{"email":"support@macrostrategies.ai","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. 3 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"],"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\/sessions":{"post":{"operationId":"aisearch_sessions","summary":"Managed RAG Inference","description":"Managed RAG session on rag.gedx402.com \u2014 one x402 payment creates an instance plus prepaid index\/query credits (max 5 index \/ 10 query). POST optional id, initial_index {url}, query, and budget; returns session_id, session_token, paths, and optional results. Send session_token on index\/query (X-AISearch-Session-Token or body) \u2014 no 402 until credits exhausted. Expires after 7 days idle. Bundle: GET \/v1\/models?bundle=managed-rag.","tags":["RAG"],"security":[{"x402":[]}],"x-payment-info":{"protocols":[{"x402":{"network":"eip155:8453","asset":"USDC","label":"Base"}}],"price":{"mode":"dynamic","currency":"USD","min":"0.073000","max":"0.620000"}},"responses":{"200":{"description":"Inference result","content":{"application\/json":{"schema":{"type":"object"},"example":{"session_id":"550e8400-e29b-41d4-a716-446655440000","session_token":"abc123\u2026","instance_id":"ged-abc123","index_path":"\/v1\/aisearch\/ged-abc123\/index","query_path":"\/v1\/aisearch\/ged-abc123\/query","credits":{"index_ops_remaining":0,"queries_remaining":0}}}}},"400":{"description":"Invalid or over-limit payload"},"402":{"description":"Payment required (x402 v2 USDC on Base). Unpaid 402 includes PAYMENT-REQUIRED. After a rejected PAYMENT-SIGNATURE the JSON body is { reason_code, detail, next_step }.","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":{"id":{"type":"string","description":"Optional instance id (lowercase, hyphens). Auto-generated if omitted."},"initial_index":{"type":"object","description":"Optional first ingest \u2014 url, text, or file_base64 (same fields as index route).","properties":{"url":{"type":"string","description":"Public URL to fetch and index."},"text":{"type":"string"},"file_base64":{"type":"string"},"filename":{"type":"string"},"poll":{"type":"boolean"}}},"query":{"type":"string","description":"Optional first hybrid search query."},"top_k":{"type":"integer","description":"Max chunks when query is set (1-50)."},"retrieval_type":{"type":"string","enum":["hybrid","vector","keyword"]},"budget":{"type":"object","description":"Prepaid index\/query credits included in the single x402 payment (max 5 index \/ 10 query \u2014 matches the quoted worst case).","properties":{"max_index_ops":{"type":"integer","minimum":0,"maximum":5},"max_queries":{"type":"integer","minimum":0,"maximum":10}}}}},"example":{"initial_index":{"url":"https:\/\/example.com\/docs"},"query":"How do I configure managed RAG?","budget":{"max_index_ops":1,"max_queries":1}}}}},"servers":[{"url":"https:\/\/rag.gedx402.com"}],"x-resource-url":"https:\/\/rag.gedx402.com\/v1\/aisearch\/sessions"}},"\/v1\/aisearch\/outcome\/answer":{"post":{"operationId":"aisearch_outcome_answer","summary":"Managed RAG Inference","description":"Cited RAG answer on rag.gedx402.com: one x402 payment indexes URL(s) (max 5, \u226465536 bytes each), runs hybrid retrieval, synthesizes a cited answer, and mints a prepaid session. POST { url or urls[], question, budget?, top_k?, poll? }; budget.max_queries defaults to 5 (cap 10; one for the answer, rest follow up with session_token). Expires after 7 days idle. Returns session_token, query_path, credits. x402 settlement USDC per request (see unpaid 402 or GET \/v1\/models).","tags":["RAG"],"security":[{"x402":[]}],"x-payment-info":{"protocols":[{"x402":{"network":"eip155:8453","asset":"USDC","label":"Base"}}],"price":{"mode":"dynamic","currency":"USD","min":"0.110000","max":"0.626290"}},"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 \u2014 send via X-AISearch-Session-Token on query_path for follow-ups without x402."},"instance_id":{"type":"string"},"cf_instance_id":{"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 \u2014 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 managed RAG by \u2026 [1]","citations":[{"index":1,"url":"https:\/\/example.com\/docs","snippet":"\u2026","score":0.92}],"session_id":"550e8400-e29b-41d4-a716-446655440000","session_token":"abc123\u2026","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 \u2014 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). Unpaid 402 includes PAYMENT-REQUIRED. After a rejected PAYMENT-SIGNATURE the JSON body is { reason_code, detail, next_step }.","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). Caps: 5 urls\/index ops, 10 queries.","properties":{"max_index_ops":{"type":"integer","minimum":1,"maximum":5,"description":"Total prepaid index ops (defaults to url count; max 5)."},"max_queries":{"type":"integer","minimum":1,"maximum":10}}}},"required":["question"]},"example":{"url":"https:\/\/example.com\/docs","question":"How do I configure managed RAG?","budget":{"max_queries":5}}}}},"servers":[{"url":"https:\/\/rag.gedx402.com"}],"x-resource-url":"https:\/\/rag.gedx402.com\/v1\/aisearch\/outcome\/answer"}},"\/v1\/aisearch\/instances":{"post":{"operationId":"aisearch_instances","summary":"Managed RAG Inference","description":"Managed RAG starter: create a managed RAG instance on rag.gedx402.com (expires after 7 days idle; activity extends the window). POST optional id; returns instance id, index_path, query_path, and expires_at. Prefer POST \/v1\/aisearch\/sessions for single-hop create+index+query. Bundle: GET \/v1\/models?bundle=managed-rag.","tags":["RAG"],"security":[{"x402":[]}],"x-payment-info":{"protocols":[{"x402":{"network":"eip155:8453","asset":"USDC","label":"Base"}}],"price":{"mode":"dynamic","currency":"USD","min":"0.050000","max":"0.120000"}},"responses":{"200":{"description":"Inference result","content":{"application\/json":{"schema":{"type":"object"},"example":{"instance_id":"ged-abc123","index_path":"\/v1\/aisearch\/ged-abc123\/index","query_path":"\/v1\/aisearch\/ged-abc123\/query","expires_at":"2026-11-19T12:00:00.000Z"}}}},"400":{"description":"Invalid or over-limit payload"},"402":{"description":"Payment required (x402 v2 USDC on Base). Unpaid 402 includes PAYMENT-REQUIRED. After a rejected PAYMENT-SIGNATURE the JSON body is { reason_code, detail, next_step }.","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":{"id":{"type":"string","description":"Optional instance id (lowercase, hyphens). Auto-generated if omitted."}}},"example":{}}}},"servers":[{"url":"https:\/\/rag.gedx402.com"}],"x-resource-url":"https:\/\/rag.gedx402.com\/v1\/aisearch\/instances"}},"\/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"]},"x-discovery":{"ownershipProofs":["0xb3C2776cE3F99cb3366520c27b4aC5D436942Ab6"]},"components":{"securitySchemes":{"x402":{"type":"apiKey","in":"header","name":"PAYMENT-SIGNATURE","description":"x402 v2. First POST without this header returns 402 + PAYMENT-REQUIRED. Sign the Base accept (eip155:8453) with @x402\/fetch and retry once. After a rejected signature the 402 body is { reason_code, detail, next_step }."}}}}