{"uid":"cap_1iQ7rYE_e1oYXzFrtIyRn","slug":"payweave-retrieval-rerank-65411d9c","name":"PayWeave Retrieval Rerank","description":"Text embeddings and reranking on Cloudflare Workers AI.","url":"https://retrieval.payweave.services/rerank","method":"POST","headers":{},"bodySchema":{"type":"object","required":["query","documents"],"properties":{"query":{"type":"string","description":"The search query. Up to 2000 characters."},"top_k":{"type":"integer","description":"Return only the top K highest-scoring documents. Defaults to all, ranked."},"documents":{"type":"array","description":"Candidate documents to score against the query. 1-50 items, each up to 2000 characters."}}},"responseSchema":{"type":"object","required":["results"],"properties":{"results":{"type":"array","items":{"type":"object","required":["index","score","document"],"properties":{"index":{"type":"integer","minimum":0,"description":"Index into the input `documents` array"},"score":{"type":"number","description":"Relevance score; higher is more relevant"},"document":{"type":"string","description":"The document text at `index`"}},"additionalProperties":false},"description":"Documents ordered by descending relevance score"}},"description":"Reranked documents","additionalProperties":false},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_LV7dI4kT-pM64JmzsVjs_","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Reranks a list of candidate documents by relevance to a search query using Cloudflare Workers AI","exampleAgentPrompt":"I have a user query 'what are the side effects of ibuprofen' and 20 candidate passages I pulled from a knowledge base — can you rerank them by relevance to the query and return just the top 5?","exampleUseCases":null,"resultDescription":"An array of documents ordered by descending relevance score, each including the original document text, its index in the input array, and a numerical relevance score — making it easy to identify and extract the most relevant results.","failureModes":["More than 50 documents submitted — API rejects with validation error","Query or individual document exceeds 2000 characters — truncation or rejection","Empty documents array — required field missing, 400 error","Service unavailable on Cloudflare Workers AI backend — 5xx response","Payment not included or insufficient — 402 Payment Required response"],"whenToPreferThis":"Use this endpoint when you need a pay-per-call, low-cost reranker backed by Cloudflare's global edge network without managing your own infrastructure. Ideal for RAG pipelines needing fast cross-encoder style reranking of up to 50 candidate passages. Prefer this over embedding-only similarity when you need a more accurate relevance signal for a specific query.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T18:37:16.005Z","isFirstParty":false}