# PayAI Cited Answer (RAG)

> PayAI Cited Answer (RAG) is a paid API for AI agents from payai.agentstools.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Answers a natural-language question by searching the public web, reading top pages, and synthesizing a grounded response with cited source URLs to minimize hallucination.

## Facts

- Endpoint: GET https://payai.agentstools.dev/answer
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/payai-cited-answer-rag-7de62d1e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_fFx1dNFdvp1D19JIHZwkc

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 payai-cited-answer-rag-7de62d1e
```

Example prompt: What are the latest clinical trial results for GLP-1 weight-loss drugs? Search the web, read up to 4 sources, and give me a cited answer with the source URLs.

## When to prefer this

Choose this endpoint when you need a factual, sourced answer to a natural-language question and hallucination risk is unacceptable — particularly for current events, recent data, or niche topics not reliably in a model's training data. Prefer it over raw LLM answers when citations are required for verification, and over generic web search when you need synthesis rather than a list of links.

## Known failure modes

- No relevant pages found for the query — empty or low-quality answer returned
- Query too vague to surface useful web results
- Timelimit filter too narrow — no results within that time window
- max_sources set to 1 may yield thin or one-sided answers
- Web pages behind paywalls or bot-blocks may not be readable
- Rate limit or payment failure returns 402 error

## How this service works

Cited answer (RAG): a natural-language question is answered by searching the public web, reading the top pages and synthesizing a grounded answer with a list of source URLs. Answer cites only the retrieved sources (anti-hallucination).

## Output

A synthesized natural-language answer to the posed question, grounded exclusively in retrieved web pages, accompanied by a list of source URLs that back each claim — designed to minimize hallucination by citing only what was actually found.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "query"
     ],
     "properties": {
      "query": {
       "type": "string",
       "description": "The question to answer"
      },
      "region": {
       "type": "string",
       "description": "Locale like 'us-en', 'uk-en' (default us-en)"
      },
      "timelimit": {
       "enum": [
        "d",
        "w",
        "m",
        "y"
       ],
       "type": "string",
       "description": "Freshness filter: past day/week/month/year"
      },
      "max_sources": {
       "type": "integer",
       "maximum": 5,
       "minimum": 1,
       "description": "How many web pages to read (default 3)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/payai-cited-answer-rag-7de62d1e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from payai.agentstools.dev](https://www.zero.xyz/host/payai.agentstools.dev/llms.txt)
