{"uid":"cap_SFpKuhwLpV93Yi74Dqraj","slug":"gedx402-rerank-api-485a5081","name":"GEDX402 Rerank API","description":"Rerank documents against a query with BGE Reranker Base (@cf/baai/bge-reranker-base). POST query plus documents[]; returns relevance scores for search and RAG pipelines.","url":"https://embed.gedx402.com/v1/rerank","method":"GET","headers":{},"bodySchema":{"type":"object","properties":{"query":{"type":"string"},"top_k":{"type":"integer"},"contexts":{"type":"array","items":{"type":"object"}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.0023","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","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.0023/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0023","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0023","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_7u3vjtSza1mxHlEIe0282","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0023","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 text passages by relevance to a query, returning ranked indices with similarity scores","exampleAgentPrompt":"Rerank these 5 passages against the query 'how does photosynthesis work' and return the top 3 most relevant ones: [passage1, passage2, passage3, passage4, passage5].","exampleUseCases":null,"resultDescription":"A JSON array of objects, each containing an 'index' (integer referencing the original position in the input contexts array) and a 'score' (float between 0 and 1 representing relevance to the query), sorted by descending relevance. Only the top_k results are returned.","failureModes":["Payment not provided or insufficient USDC — returns HTTP 402 Payment Required","Empty or missing 'query' field — likely returns a validation error","Empty 'contexts' array — may return an empty result set or error","top_k greater than the number of provided contexts — may return fewer results than requested","Malformed context objects missing 'text' field — likely causes a server error or skipped entries"],"whenToPreferThis":"Choose this endpoint when you need to rerank a pre-retrieved set of passages without managing API keys, and you want to pay per-call in USDC via the x402 protocol. Ideal for RAG pipelines where you want a cross-encoder-style reranker step after initial vector retrieval. Prefer this over embedding-only search when you need finer relevance scoring. The no-API-key model and multi-chain USDC payment (Base, Polygon, Arbitrum, World, Solana) make it suitable for autonomous agent workflows that manage crypto wallets.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T00:45:03.676Z","isFirstParty":false}