# MolCloud AI Rerank

> MolCloud AI Rerank is a paid API for AI agents from api.molcloud.net, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-17).

Reranks a list of candidate text passages by relevance to a given query, returning scored and ordered results.

## Facts

- Endpoint: POST https://api.molcloud.net/api/ai/rerank?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-17
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/molcloud-ai-rerank-764d429d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_1MroVu5IbnZLHcw3FMWcX

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 molcloud-ai-rerank-764d429d -d '<json body>'
```

Example prompt: Rerank these 8 passages against the query 'what are the health benefits of omega-3 fatty acids' and return the top 3 most relevant ones.

## When to prefer this

Choose this endpoint when you need fast, pay-per-request semantic reranking of retrieved text passages without managing your own reranking model infrastructure. It is ideal for RAG pipelines, retrieval augmentation, or search result post-processing where you need relevance scores and can pay micro-amounts in USDC per call via x402. Prefer this over embedding-based cosine similarity when you want a dedicated cross-encoder-style relevance signal.

## Known failure modes

- Empty documents array returns error or empty ranked list
- topK larger than documents array length may return fewer results than requested
- Very long passages may be truncated or cause latency spikes
- Payment failure (insufficient USDC balance) returns HTTP 402 before processing
- Malformed query or missing required fields returns validation error

## How this service works

40 pay-per-request AI, search, headless browser, crypto alpha & memory APIs for autonomous agents settling in USDC on Base via x402 v2.

## Output

A JSON object containing a ranked array of objects, each with the original document index and a relevance score (e.g. 0.992). Only the top-K results are returned, sorted by descending score.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "topK": {
   "type": "integer",
   "default": 5,
   "description": "Number of top documents to return"
  },
  "query": {
   "type": "string",
   "description": "Search query to rank documents against"
  },
  "documents": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "description": "Candidate text passages to rerank"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "ranked": [
    {
     "index": 0,
     "score": 0.992
    }
   ]
  },
  "status": "success",
  "endpoint": "/api/ai/rerank"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/molcloud-ai-rerank-764d429d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.molcloud.net](https://www.zero.xyz/host/api.molcloud.net/llms.txt)
