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

Trusted by 500+ Companies, from Startups to Industry Leaders

TUTORIAL

How to rerank documents with Eden AI?

Rerank API

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

Rerank in One Call

Cohere v2 format: send passages, keep the best.

curl 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": ["Reset your password in Settings > Security.", "Enterprise plans include SSO.",
                     "Invoices are emailed monthly.", "2FA adds a code at sign-in."]}'
# → doc 0: 0.87, doc 3: 0.13, doc 1: 0.03, doc 2: 0.02 (cost $0.001)
See documentation

16 Models, 9 Providers

Google Vertex AI, Amazon Bedrock, Qwen, DeepInfra, Fireworks, GreenPT, IONOS and Infomaniak, from $0.001 per query or $0.01 per 1M tokens. Nine models run in the EU. Full 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
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
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.