Rerank passages by relevance to a query via Cloudflare Workers AI (@cf/baai/bge-reranke…
Rerank passages by relevance to a query via Cloudflare Workers AI (@cf/baai/bge-reranker-base). Send {query, documents[] (≤50, each ≤4000 chars), topK?}; returns [{index, score}] best-first — the missing link after embed/chunk, keeping the top chunks before a…
by 402utils.com · discovered, not yet claimed by its owner · updated 2026-09-16
Mirrored from Coinbase's public x402 Bazaar. The description is the provider's own text and has not been reviewed here; the payment requirements are copied as published.
What it does
Rerank passages by relevance to a query via Cloudflare Workers AI (@cf/baai/bge-reranker-base). Send {query, documents[] (≤50, each ≤4000 chars), topK?}; returns [{index, score}] best-first — the missing link after embed/chunk, keeping the top chunks before a costly LLM call. Score is the model's relevance score (higher = better), named as it only compares within this model. Unavailable binding → 503, unbilled.
Tags: bazaar
Use with an agent
- Discover. Agents find this listing with
GET https://bazaar.saylorinnovations.com/discovery/search?query=…, the MCP toolsearch_resources, or/discovery/resources. - Inspect. Fetch
/resources/5904.jsonfor the price and payment options. - Pay. Call
GET https://402utils.com/v1/rerank. The provider answers402with its payment requirements. An x402 client signs one of the options below and retries withPAYMENT-SIGNATURE. - Execute. The provider returns
200with the data. Agent Bazaar is not in the request path and never sees your payment.
For humans
You don't need an account or an API key; you need a wallet holding a small amount of USDC on Base, and an x402-capable client (see the examples below). Call the endpoint unpaid first to see exactly what it asks for.
Pricing & payment
- Price
- $0.004 / request
- Protocol
- x402 v2
- Auth
- No account or API key. Pay per request.
- Networks
- Base
- Uptime
- 0 of the last 1 checks answered
- Calls (30d)
- 1 · 1 unique payers (third-party data from the public x402 Bazaar)
x402 payment requirements
| Scheme | Network | Asset | Amount | Pay to | Timeout |
|---|---|---|---|---|---|
| exact | Base eip155:8453 | USDC | $0.004 | 0xc55A2D530b53CBaD1001e4AfD4720B7E71f9C291 | 60s |
accepts[] (raw JSON)
[
{
"scheme": "exact",
"network": "eip155:8453",
"payTo": "0xc55A2D530b53CBaD1001e4AfD4720B7E71f9C291",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "4000",
"amountUsd": 0.004,
"maxTimeoutSeconds": 60
}
]Schemas
Output schema (JSON Schema)
{
"bazaar": {
"info": {
"input": {
"body": {
"documents": [
"To reset your password, click 'Forgot password' on the sign-in page.",
"Our office is open Monday to Friday, 9am to 5pm.",
"Passwords must be at least 12 characters and are reset from account settings."
],
"query": "How do I reset my password?",
"topK": 2
},
"bodyType": "json",
"method": "POST",
"type": "http"
},
"output": {
"example": {
"model": "@cf/baai/bge-reranker-base",
"results": [
{
"index": 0,
"score": 0.98
},
{
"index": 2,
"score": 0.71
}
]
},
"type": "json"
}
},
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"input": {
"additionalProperties": false,
"properties": {
"body": {
"properties": {
"documents": {
"description": "Candidate passages to rank (≤ 50, each ≤ 4000 chars).",
"items": {
"type": "string"
},
"maxItems": 50,
"type": "array"
},
"query": {
"description": "The search query (≤ 4000 chars).",
"type": "string"
},
"returnDocuments": {
"default": false,
"description": "Include each ranked document's text in the results.",
"type": "boolean"
},
"topK": {
"description": "Return only the K best (default: all, ranked).",
"minimum": 1,
"type": "integer"
}
},
"required": [
"query",
"documents"
],
"type": "object"
},
"bodyType": {
"enum": [
"json",
"form-data",
"text"
],
"type": "string"
},
"method": {
"enum": [
"POST"
],
"type": "string"
},
"type": {
"const": "http",
"type": "string"
}
},
"required": [
"type",
"method",
"bodyType",
"body"
],
"type": "object"
},
"output": {
"properties": {
"example": {
"additionalProperties": false,
"properties": {
"model": {
"description": "The reranker model used (scores compare only within one model).",
"type": "string"
},
"results": {
"description": "Ranked best-first. `index` refers to the input documents array.",
"items": {
"properties": {
"document": {
"description": "The document text (only when returnDocuments=true).",
"type": "string"
},
"index": {
"description": "Position of this document in the request `documents` array.",
"type": "integer"
},
"score": {
"description": "Relevance score from the model (higher = more relevant).",
"type": "number"
}
},
"required": [
"index",
"score"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"results",
"model"
],
"type": "object"
},
"type": {
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
}
},
"required": [
"input"
],
"type": "object"
}
}
}Example shape — generated from the schema, not a captured live response
nullExamples
curl "https://402utils.com/v1/rerank"
# -> 402 Payment Required, accepts[] lists how to pay
# retry with a PAYMENT-SIGNATURE (or PAYMENT header) once paidconst res = await fetch("https://402utils.com/v1/rerank");
if (res.status === 402) {
const { accepts } = await res.json();
// pay one of accepts[] via an x402 client, then retry with the payment header
}import httpx
res = httpx.get("https://402utils.com/v1/rerank")
if res.status_code == 402:
accepts = res.json()["accepts"]
# pay one of accepts[] via an x402 client, then retry with the payment headerDetails
- Provider
- 402utils.com
- Endpoint
- https://402utils.com/v1/rerank
- Machine-readable
/resources/5904.json