# GEDX402 AI Search – RAG Answer from URLs

> GEDX402 AI Search – RAG Answer from URLs is a paid API for AI agents from rag.gedx402.com, paid per call via x402, $0.625/call, status unknown (last checked 2026-09-14).

Fetches and indexes one or more public URLs, then answers a natural-language question using retrieved content chunks, returning a cited answer and a session for follow-up queries.

## Facts

- Endpoint: GET https://rag.gedx402.com/v1/aisearch/outcome/answer
- Price: $0.625/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/gedx402-ai-search-rag-answer-from-urls-85681979
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_r594_g5zE4YJwE7f4u9d9

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability gedx402-ai-search-rag-answer-from-urls-85681979
```

Example prompt: Fetch https://docs.example.com/getting-started and answer this question using hybrid retrieval with up to 10 chunks: 'How do I configure authentication?' — pay with USDC on Base, no API key needed.

## When to prefer this

Choose this endpoint when you need to answer natural-language questions grounded in specific public web content (up to 5 URLs) and want cited, retrievable answers without managing API keys or vector database infrastructure. It is ideal for agents that need to do lightweight RAG over fresh URLs on demand, paid per-call via USDC on multiple chains. Prefer it over general web search when you have specific source URLs and need traceable citations.

## Known failure modes

- URL is not publicly accessible or returns non-200 — indexing fails with an error on that URL
- Question field missing — no answer generated, likely returns a 400 or empty answer
- Payment not received or insufficient USDC — x402 payment required response returned before processing
- All query credits exhausted — follow-up queries require a new payment
- URL content too large or unsupported format — indexing may partially fail or truncate
- poll=false with slow indexing — answer may be empty or low quality if index not ready

## How this service works

Single-hop cited RAG answer — one x402 POST indexes URL(s), hybrid retrieval, and chat/fast synthesis with session_token for follow-up queries. $0.625 USDC per request. Agent search: rag answer, research, cited answer, hybrid retrieval.

## Output

A JSON object containing a natural-language answer with inline citation numbers, an array of citations (URL, snippet, relevance score), a session token and query path for follow-up questions without additional payment, remaining query and index-op credit counts, and provenance data including fetch timestamp and content hash.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string"
  },
  "poll": {
   "type": "boolean"
  },
  "urls": {
   "type": "array",
   "items": {
    "type": "string"
   }
  },
  "top_k": {
   "type": "integer"
  },
  "budget": {
   "type": "object",
   "additionalProperties": true
  },
  "rerank": {
   "type": "boolean"
  },
  "question": {
   "type": "string"
  },
  "rewrite_query": {
   "type": "boolean"
  },
  "retrieval_type": {
   "enum": [
    "hybrid",
    "vector",
    "keyword"
   ],
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "answer": "Configure AI Search by … [1]",
  "credits": {
   "queries_remaining": 4,
   "index_ops_remaining": 0
  },
  "citations": [
   {
    "url": "https://example.com/docs",
    "index": 1,
    "score": 0.92,
    "snippet": "…"
   }
  ],
  "provenance": {
   "fetched_at": "2026-06-18T12:00:00.000Z",
   "latency_ms": 2400,
   "content_sha256": "a1b2c3d4e5f6789012345678901234567890abcd"
  },
  "query_path": "/v1/aisearch/ged-abc123/query",
  "session_id": "550e8400-e29b-41d4-a716-446655440000",
  "instance_id": "ged-abc123",
  "instructions": "Send session_token via X-AISearch-Session-Token header or body on query_path — no x402 until credits exhausted.",
  "session_token": "abc123…"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/gedx402-ai-search-rag-answer-from-urls-85681979/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from rag.gedx402.com](https://www.zero.xyz/host/rag.gedx402.com/llms.txt)
