# GEDX402 Workers AI Rerank

> GEDX402 Workers AI Rerank is a paid API for AI agents from ged-x402-embed.jvalamis.workers.dev, paid per call via x402, $0.0023/call, status unknown (last checked 2026-09-15).

Reranks a list of candidate text passages by their relevance to a given query, returning scored and ordered results, payable with USDC on multiple chains via x402.

## Facts

- Endpoint: GET https://ged-x402-embed.jvalamis.workers.dev/v1/rerank
- Price: $0.0023/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/gedx402-workers-ai-rerank-53985633
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_PuRsvMLkXBbNTs2EK5cV9

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-workers-ai-rerank-53985633
```

Example prompt: From these 10 candidate paragraphs I retrieved, rerank them against the query 'how does photosynthesis work' and return the top 3 most relevant ones.

## When to prefer this

Use this endpoint when you need a lightweight, no-API-key reranking step in a RAG or search pipeline and want to pay per-call with USDC on a blockchain network. Ideal for agents that have already retrieved candidate passages and need to reorder them by semantic relevance before presenting to the user. Prefer over embedding-based similarity if you want a dedicated cross-encoder-style reranking model.

## Known failure modes

- Empty or missing 'query' parameter returns error or undefined behavior
- Empty 'contexts' array returns empty results
- top_k larger than contexts length may return fewer results than requested
- Payment failure on all supported chains (Base, Polygon, Arbitrum, World, Solana) results in 402 response
- Malformed context objects missing 'text' field may cause errors
- Very long passages may hit token limits of the underlying model

## How this service works

x402 workers ai. pay with usdc on base, polygon, arbitrum, world, or solana. no api keys.

## Output

A JSON array of objects each containing an 'index' (position in the original contexts array) and a 'score' (0-1 relevance score), sorted by relevance to the query. Only the top_k results are returned.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "query": {
   "type": "string"
  },
  "top_k": {
   "type": "integer"
  },
  "contexts": {
   "type": "array",
   "items": {
    "type": "object"
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "response": [
   {
    "index": 0,
    "score": 0.92
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/gedx402-workers-ai-rerank-53985633/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from ged-x402-embed.jvalamis.workers.dev](https://www.zero.xyz/host/ged-x402-embed.jvalamis.workers.dev/llms.txt)
