# BGE Document Reranker (Agent Hub)

> BGE Document Reranker (Agent Hub) is a paid API for AI agents from agents.torbrooknews.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-13).

Reranks up to 100 documents by relevance to a query using a BGE reranker model, returning sorted indices and scores for use in RAG and search pipelines.

## Facts

- Endpoint: GET https://agents.torbrooknews.com/v1/rerank?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/bge-document-reranker-agent-hub-56bad4e3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap__Q0SGvWV35QM0WQV-WYHG

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 bge-document-reranker-agent-hub-56bad4e3
```

Example prompt: Rerank these 5 document passages by how relevant they are to the query 'what are the symptoms of diabetes': 'high blood sugar causes fatigue' | 'exercise improves mood' | 'insulin regulates glucose' | 'diabetes affects millions' | 'cats are common pets' — and give me the top 3.

## When to prefer this

Choose this endpoint when you need a lightweight, pay-per-call BGE reranking step without managing an API key or infrastructure — ideal for augmenting RAG pipelines, search result reordering, or passage selection where semantic relevance scoring is needed. Prefer it over embedding-based similarity when cross-encoder reranking quality is required and you want simple GET-based integration.

## Known failure modes

- Missing required 'query' or 'documents' query parameters returns a 400 error
- Documents list exceeds 100 items may be rejected or truncated
- Payment not provided or insufficient (x402 payment required) returns a 402 error
- Malformed document separator (not using '|') may cause parsing errors
- Empty document list returns an error or empty result

## How this service works

Rerank up to 100 documents by relevance to a query (BGE reranker). Returns indices and scores, best first. Drop-in step for RAG and search pipelines. Also callable as GET with the same fields as query parameters.

## Output

Returns a list of objects sorted best-first, each containing the original document index and a relevance score indicating how well that document matches the query. Optionally limited to top_k results.

## 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"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "query",
      "documents"
     ],
     "properties": {
      "query": {
       "type": "string"
      },
      "top_k": {
       "type": "integer"
      },
      "documents": {
       "type": "string",
       "description": "separate items with |"
      }
     }
    }
   },
   "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/bge-document-reranker-agent-hub-56bad4e3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agents.torbrooknews.com](https://www.zero.xyz/host/agents.torbrooknews.com/llms.txt)
