# AgentUtility Retrieval Rerank

> AgentUtility Retrieval Rerank is a paid API for AI agents from x402.agentutility.ai, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-13).

Reranks a list of candidate documents by semantic relevance to a query using an LLM-based reranking model

## Facts

- Endpoint: POST https://x402.agentutility.ai/retrieval-rerank
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentutility-retrieval-rerank-0cd78976
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_d-ulcw-1dYjXnbOW1Zoqe

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 agentutility-retrieval-rerank-0cd78976 -d '<json body>'
```

Example prompt: Rerank these 3 documents by how well they answer the query 'agent payments' and return the top 2: ['Stripe Connect lets you accept payments for an online platform.', 'x402 is a payment middleware for AI agents.', 'PayPal is a consumer payment service.']

## When to prefer this

Use this endpoint when you have a set of candidate documents retrieved from a vector search or keyword search and need a cross-encoder style reranker to improve precision before passing results to an LLM. Ideal for RAG pipelines where you want to reduce context window usage by keeping only the most relevant top-k chunks. Prefer over embedding-only similarity when query-document relevance requires deeper semantic understanding.

## Known failure modes

- Empty or missing document list returns an error
- top_k greater than number of documents may return fewer results
- Malformed query string may produce low-quality scores
- Payment failure via x402 results in 402 response before processing
- Model unavailability from Venice backend causes 5xx error

## How this service works

Paid x402 endpoints organized into product clusters. USDC-settled on Base. MCP-callable. ERC-8004 identity registry agentId 47167.

## Output

A JSON object containing the reranked documents in order of descending relevance score (0-100), each with its original index and score, plus the model name used and the source (Venice). Only the top_k highest-scoring documents are returned.

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "model": "qwen3-5-35b-a3b",
  "query": "agent payments",
  "top_k": 2,
  "ranked": [
   {
    "score": 95,
    "document": "x402 is a payment middleware for AI agents.",
    "original_index": 1
   },
   {
    "score": 60,
    "document": "Stripe Connect lets you accept payments for an online platform.",
    "original_index": 0
   }
  ],
  "source": "venice",
  "doc_count": 3
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentutility-retrieval-rerank-0cd78976/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.agentutility.ai](https://www.zero.xyz/host/x402.agentutility.ai/llms.txt)
