{"uid":"cap_1nf-s_HiMrWs9UtLWjIZa","slug":"aile-rerank-api-2b5f86b1","name":"Aile Rerank API","description":"Rent trusted AI models priced per token; lend idle subscriptions and API keys. A live, metered market that settles every call in USDC on Solana.","url":"https://api.aile.sh/v1/rerank?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","required":["model","query","documents"],"properties":{"model":{"type":"string","description":"`<provider>/<model>`, e.g. `openrouter/cohere/rerank-4-pro`. GET /v1/models?output_modalities=rerank lists what is servable, with prices."},"query":{"type":"string"},"top_n":{"type":"integer"},"documents":{"type":"array","description":"Up to 100 documents per search."},"return_documents":{"type":"boolean"}}},"responseSchema":{"object":"list","results":[{"index":2,"document":{"text":"…"},"relevance_score":0.91}]},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.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_LEiqWlXzI_EEpWBe21p63","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","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 documents by relevance to a query using premium AI reranking models, billed per call in USDC on Solana","exampleAgentPrompt":"Rerank these 20 passages against the query 'climate change effects on agriculture' using openrouter/cohere/rerank-4-pro and return the top 5 with their relevance scores.","exampleUseCases":[{"title":"RAG pipeline result refinement","prompt":"I've got 50 candidate chunks from my vector search for the query 'best practices for kubernetes security' — rerank them using openrouter/cohere/rerank-4-pro and give me the top 10 most relevant ones with their scores."},{"title":"E-commerce search quality boost","prompt":"Rerank these 30 product descriptions against the user's search query 'lightweight waterproof hiking boots' using openrouter/cohere/rerank-4-pro and return the top 8 results with the original document text."},{"title":"Legal document relevance ranking","prompt":"I have 100 legal case summaries and need to find the most relevant ones to the argument 'liability in autonomous vehicle accidents' — use openrouter/cohere/rerank-4-pro to rerank them and show me the top 15 with relevance scores."}],"resultDescription":"Returns a ranked list of result objects, each containing the original document index, an optional document text snippet, and a relevance_score (0–1) indicating how closely the document matches the query, sorted by descending relevance.","failureModes":["Invalid or unavailable model identifier returns an error — check GET /v1/models?output_modalities=rerank for valid options","More than 100 documents per request exceeds the limit and will be rejected","Insufficient USDC balance causes payment failure and the call is not executed","Malformed query or empty documents array returns a validation error","Network latency or model provider downtime may cause timeouts"],"whenToPreferThis":"Choose this endpoint when you need a pay-per-call reranking service without managing your own model subscriptions, especially when you want access to premium models like Cohere Rerank 4 Pro via a metered USDC marketplace. It is ideal for RAG pipelines, semantic search post-processing, and any scenario where you need to reorder a candidate document set by relevance to a query without committing to a direct API subscription.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-10T06:33:30.070Z","isFirstParty":false,"canonicalSlug":"aile-rerank-api-2b5f86b1"}