All
Text Processing

Rerank API

Reorder retrieved documents by relevance to a query before they reach your LLM. The Eden AI Rerank API follows the Cohere v2 format and gives you 16 reranker models from 9 providers behind one API key.

Rerank API: documents reordered by relevance score

Trusted by 500+ Companies, from Startups to Industry Leaders

TUTORIAL

How to rerank documents with Eden AI?

Rerank API: documents reordered by relevance score

What is a Rerank API?

A rerank API takes a query and a list of documents and returns the documents sorted by relevance, each with a score. It runs after a first retrieval step, such as vector search with embeddings or keyword search, which is fast but approximate. A reranker reads the query and each document together, so it catches matches that embeddings miss and puts the best passages at the top of the context you send to an LLM. Fewer, better passages mean more accurate answers and fewer input tokens.

Try now

Add Reranking to Your RAG Pipeline in One Call

Retrieve 20 to 100 candidates with keyword search or vector search on embeddings, send them to POST /v3/rerank with the user's query, and keep the top results for your prompt. The request and the response follow the Cohere v2 rerank API, so an existing Cohere client works by changing the base URL and the model id.

REQUEST
curl -X POST https://api.edenai.run/v3/rerank \
  -H "Authorization: Bearer $EDENAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "vertex/semantic-ranker-default-005",
    "query": "How do I reset my password?",
    "documents": [
      "To reset your password, open Settings, then Security, and click Reset password.",
      "Enterprise plans include SSO, audit logs and a dedicated account manager.",
      "Invoices are emailed on the first day of each month.",
      "Two-factor authentication adds a code from your phone at sign-in."
    ]
  }'
RESPONSE (TRIMMED)
{
  "results": [
    { "index": 0, "relevance_score": 0.9313 },
    { "index": 3, "relevance_score": 0.1446 },
    { "index": 1, "relevance_score": 0.0315 },
    { "index": 2, "relevance_score": 0.0164 }
  ],
  "cost": 0.001,
  "provider": "vertex"
}

Each result gives the index of a document and its relevance score, sorted from best to worst. The password article comes first, the 2FA guide second. The response also reports what the call cost.

See documentation

16 Reranker Models From 9 Providers, One Bill

Call rerankers from Google Vertex AI, Amazon Bedrock, Qwen, Alibaba Cloud, DeepInfra, Fireworks AI, GreenPT, IONOS and Infomaniak with the same API key. Each model is priced either per query or per token, at the provider's rate. Nine models run in an EU region and also answer on the Eden AI EU endpoint.

Open the Rerank catalog in the Eden AI app to see every reranker model with its provider, price and region, and filter by EU hosting or zero data retention. Then run the same query and documents through two or three models to see which ranking fits your data.

ModelPriceRegion
vertex/semantic-ranker-default-005$0.001 / queryEU
vertex/semantic-ranker-fast-005$0.001 / queryEU
vertex/semantic-ranker-default-004$0.001 / queryEU
vertex/semantic-ranker-fast-004$0.001 / queryEU
vertex/semantic-ranker-default-003$0.001 / queryEU
vertex/semantic-ranker-default-002$0.001 / queryEU
amazon/amazon.rerank-v1:0$0.001 / queryEU
greenpt/green-rerank$0.13 / 1M tokensEU
ionos/Qwen/Qwen3-VL-Reranker-8B$0.04 / 1M tokensEU
infomaniak/BAAI/bge-reranker-v2-m3$0.01 / 1M tokensCH
deepinfra/Qwen/Qwen3-Reranker-0.6B$0.01 / 1M tokensUS
deepinfra/Qwen/Qwen3-Reranker-4B$0.025 / 1M tokensUS
deepinfra/Qwen/Qwen3-Reranker-8B$0.05 / 1M tokensUS
fireworks_ai/qwen3-reranker-8b$0.20 / 1M tokensUS
qwen/qwen3-rerank$0.10 / 1M tokensGlobal
dashscope/qwen3-rerank$0.10 / 1M tokensSG

Prices and regions checked on 2 November 2026. Live list: GET /v3/rerank/models.

value

Value delivered

/ 1 /
save time

Save time

Integrate once and access hundreds of models without managing multiple APIs.

Model updates, provider changes, and new releases are handled transparently.

/ 2 /
Control costs

Reduce costs

Use the most efficient model for each need. Avoid vendor lock-in and adapt quickly to pricing or performance changes.

/ 3 /
Reduce risk

Reduce risk

Built-in fallback mechanisms protect applications from model outages. Routing flexibility allows rapid adaptation to evolving technologies and providers.

They are using Rerank API

No items found.
Solution

Got specific needs? We're here to help

AI API Gateway

5.5% platform fee

Access to hundreds of models with our unified API
Compare AI models accuracy, latency and price
Create multiple API keys for different projects
Cost and performance monitoring tools
Chat support (48h - working days)
Unlimited seats

Advanced AI Platform

Custom price

All the previous features +
High rate limits and bulk discounts
Private deployments / specific compliance needs
Custom latency / cost optimization
Dedicated support & SLA / Professional Services
Custom billing and invoicing structures

Other features

Decision API: typed answers with probabilities
Decision API
All
Text Processing

Ask typed questions about a text, such as which team, how urgent, or yes or no, and get a choice, a score or a probability back instead of prose. One request answers many questions at once, and only input tokens are billed. This endpoint is in alpha.

Data Anonymization API
All
Text Processing

Unlock the power of data privacy with our Data Anonymization API. Effortlessly protect sensitive information while maintaining data integrity for your applications.

Emotion Detection API
All
Text Processing

Unlock the power of emotion detection with our AI API. Effortlessly analyze and interpret emotions from facial expressions to enhance user experiences and drive engagement.

let’s start

Start building with Eden AI

A single interface to integrate the best AI technologies into your products.