{"uid":"cap_izsb7NuzWBwKu-fax-yXS","slug":"sitecheck-rerank-8bf22649","name":"SiteCheck Rerank","description":"Orders up to 50 documents by relevance to a query with the BGE reranker and returns rank, index and score for each. Use it after a keyword or vector search to pick the best few. Scores compare documents within one call only.","url":"https://api.sitecheck-api.workers.dev/api/rerank?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"query":{"type":"string","description":"The question or search, up to 500 characters"},"documents":{"type":"array","items":{"type":"string"},"description":"1 to 50 documents, up to 2,000 characters each"}}},"responseSchema":{"type":"json","example":{"count":2,"model":"@cf/baai/bge-reranker-base","query":"how do I pay per call","results":[{"rank":1,"index":1,"score":0.057772,"document":"x402 lets an agent pay per request in USDC, with no account."},{"rank":2,"index":0,"score":0.000037,"document":"Our office is closed on public holidays."}],"checkedAt":"2026-10-14T05:12:26.366Z"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_hFZ29fY9w34UFAhBJj7Fl","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","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 documents by relevance to a query using a neural reranker model, returning ranked results with relevance scores","exampleAgentPrompt":"Rerank these 5 document passages by how well they answer the question 'how does x402 payment work?' and return them sorted by relevance score.","exampleUseCases":[{"title":"RAG pipeline context selection","prompt":"I have these 10 retrieved chunks from my knowledge base and the user asked 'what are the cancellation policy terms?' — rerank them so I can pass only the top 3 most relevant ones to the LLM."},{"title":"Search result quality improvement","prompt":"My vector search returned these 20 product descriptions for the query 'wireless noise-cancelling headphones under $200' — can you rerank them by true relevance so the best matches appear first?"},{"title":"FAQ answer ranking","prompt":"A user asked 'how do I reset my password?' and I have these 8 FAQ entries — rerank them so the most relevant answer is at the top before I display it."}],"resultDescription":"Returns a JSON object containing the reranked documents sorted by relevance, with each result including its rank position (1-based), original index in the input array, a floating-point relevance score, and the document text. Also includes the total count, the model used (bge-reranker-base), and a timestamp.","failureModes":["More than 50 documents submitted — returns error","Document exceeds 2,000 character limit — may be truncated or rejected","Query exceeds 500 character limit — returns validation error","Empty documents array — returns error","Payment not included or insufficient — 402 Payment Required","Model inference timeout on large batches — may return 500 error"],"whenToPreferThis":"Use this endpoint when you need a lightweight, pay-per-call cross-encoder reranker to improve retrieval precision in RAG pipelines or hybrid search systems without setting up your own reranking infrastructure. It is ideal for agents that retrieve candidate documents via vector search and need to reorder them by true semantic relevance before passing to an LLM. Prefer this over embedding-based similarity when you need a dedicated cross-encoder that jointly encodes query and document for higher-quality relevance scores.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-19T06:39:43.534Z","isFirstParty":false,"canonicalSlug":"sitecheck-rerank-8bf22649"}