{"uid":"cap_d-ulcw-1dYjXnbOW1Zoqe","slug":"agentutility-retrieval-rerank-0cd78976","name":"AgentUtility Retrieval Rerank","description":"Paid x402 endpoints organized into product clusters. USDC-settled on Base. MCP-callable. ERC-8004 identity registry agentId 47167.","url":"https://x402.agentutility.ai/retrieval-rerank","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"required":["query","documents"],"properties":{"query":{"type":"string","description":"Search query."},"top_k":{"type":"number","description":"How many top documents to return. Default min(5, len(documents))."},"documents":{"type":"array","items":{"type":"string"},"description":"Candidate documents. Up to 30; each up to 2,000 chars (truncated)."}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"model":{"type":"string"},"query":{"type":"string"},"top_k":{"type":"integer"},"ranked":{"type":"array","items":{"type":"object","properties":{"score":{"type":"integer"},"document":{"type":"string"},"original_index":{"type":"integer"}}}},"source":{"type":"string"},"doc_count":{"type":"integer"}}}}}}},"responseSchema":{"type":"json","example":{"model":"qwen3-5-35b-a3b","query":"agent payments","top_k":2,"ranked":[{"score":95,"document":"x402 is a payment middleware for AI agents.","original_index":1},{"score":60,"document":"Stripe Connect lets you accept payments for an online platform.","original_index":0}],"source":"venice","doc_count":3}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_GrUwxjSlQskzvXbEuG6Zr","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Reranks a list of candidate documents by semantic relevance to a query using an LLM-based reranking model","exampleAgentPrompt":"Rerank these 3 documents by how well they answer the query 'agent payments' and return the top 2: ['Stripe Connect lets you accept payments for an online platform.', 'x402 is a payment middleware for AI agents.', 'PayPal is a consumer payment service.']","exampleUseCases":null,"resultDescription":"A JSON object containing the reranked documents in order of descending relevance score (0-100), each with its original index and score, plus the model name used and the source (Venice). Only the top_k highest-scoring documents are returned.","failureModes":["Empty or missing document list returns an error","top_k greater than number of documents may return fewer results","Malformed query string may produce low-quality scores","Payment failure via x402 results in 402 response before processing","Model unavailability from Venice backend causes 5xx error"],"whenToPreferThis":"Use this endpoint when you have a set of candidate documents retrieved from a vector search or keyword search and need a cross-encoder style reranker to improve precision before passing results to an LLM. Ideal for RAG pipelines where you want to reduce context window usage by keeping only the most relevant top-k chunks. Prefer over embedding-only similarity when query-document relevance requires deeper semantic understanding.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T12:44:12.757Z","isFirstParty":false}