{"uid":"cap_mOGwFBTAnvPulNmmBLagh","slug":"animica-rerank-api-9697b113","name":"Animica Rerank API","description":"Give a query and up to 50 candidate snippets; get the top N by relevance with a score and a one-line reason. Indexes are returned so you can map straight back to your own objects without string matching. Priced per call. For high-volume use, buy prepaid credits (POST /x402/credits/buy) and send X-Animica-Credits on each request — no settlement, no gas, no per-call payment round trip. Paying in ANM on the animica:1 lane is also ~25% cheaper because we sponsor no gas there.","url":"https://animica.dev/x402/rerank","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"query":{"type":"string"},"top_k":{"type":"integer","description":"how many to return (default 5)"},"documents":{"type":"array","description":"2..50 strings"}}},"responseSchema":{"type":"json"},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001794","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.001794/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001794","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001794","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_SJ2YcF77AnkECHk5A38o2","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001794","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 query, returning scored and reasoned results","exampleAgentPrompt":"I have these 10 retrieved passages and I want to know which 3 are most relevant to the question 'What are the side effects of ibuprofen?' — can you rerank them and give me the scores and reasons?","exampleUseCases":[{"title":"RAG pipeline context selection","prompt":"I retrieved 20 candidate chunks from my knowledge base for the question 'How do I reset a two-factor authentication device?'. Rerank them and give me the top 5 most relevant ones with scores so I can feed only those to the LLM."},{"title":"Search result relevance ordering","prompt":"I ran a keyword search and got back 15 product descriptions. The user's query is 'lightweight waterproof hiking boots for winter'. Rerank these descriptions and return the top 8 with relevance scores and a reason for each ranking."},{"title":"FAQ matching for customer support","prompt":"I have a list of 30 FAQ entries and a user asked 'Can I get a refund after 30 days?'. Rerank the FAQs against that question and return the top 3 most relevant ones so I can show them to the user."}],"resultDescription":"A JSON object containing a ranked array of results — each item includes the original document index, a float relevance score, and a human-readable reason explaining the ranking — plus the name of the model used for reranking.","failureModes":["Fewer than 2 documents provided — schema requires at least 2 strings in the documents array","More than 50 documents provided — array is capped at 50 items","Missing required fields (query or documents) returns a 400-level error","Payment failure via x402 protocol results in a 402 Payment Required response","Empty or very short documents may produce low-confidence scores and generic reasons"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, pay-per-call reranker to improve precision in a RAG or search pipeline without managing your own reranking model or API keys. It is especially useful for AI agents that need fast, scored, reasoned rankings of up to 50 documents against a free-text query, and where micropayment-based access (x402/USDC) is acceptable. Prefer alternatives if you need batch processing of thousands of documents, deterministic scoring, or integration with a specific embedding provider.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T18:43:19.780Z","isFirstParty":false}