POST /v2/rerank works against Eden AI by changing the base URL and the model id.
Endpoints
Authorization: Bearer YOUR_API_KEY header as the rest of the API. Models are identified as provider/model, for example vertex/semantic-ranker-default-004.
The V2 API has no rerank route. This is the only rerank API Eden AI offers.
List rerank models
GET /v3/rerank/models lists the models that can serve a rerank call. It takes the same view and zero_data_retention parameters as the other model listings, and each entry carries zero_data_retention, which says whether the provider keeps your inputs after the response. Only models that are in this list can be called, by their provider/model id. With view=models the entries are grouped under a model name that rerank does not accept: call one of the nested endpoints[].id values instead. Rerank lists no routing policy.
Rank documents
Request fields
fallbacks is refused with 400. Any other top-level field is forwarded to the provider. Fields that decide the provider connection, the region, or how the call is made, priced or answered, such as api_key, api_base or base_url, are refused with 422.
Response
Providers
Rerank is served by Google Vertex, Amazon Bedrock, DeepInfra, Fireworks, Qwen, GreenPT, IONOS and Infomaniak. The models you can call are the onesGET /v3/rerank/models returns; a provider appearing in this list does not mean every one of its models is offered.
Amazon Bedrock serves rerankers in fewer regions than chat models. When the region chosen for a call has no reranker, the call runs in the nearest region that has one: us-east-1 moves to us-west-2 and eu-west-1 moves to eu-central-1 for amazon.rerank-v1:0.
For how each provider handles your data, see Provider data policies.
Billing
A model is priced either per search unit or per token, never both. A model whose pricing row sets both rates, or neither, cannot be called. The unit and its rate are in thepricing of the model’s entry in GET /v3/rerank/models.
GreenPT, IONOS and Infomaniak bill in the unit their pricing row names.
Amazon Bedrock reports no usage, so Eden AI counts the search units from your request with the same chunk rule.
Eden AI estimates the cost before the call, holds that amount, and charges the actual cost when the call returns. For a per-token model the estimate reads the query once per document, plus the document tokens and a fixed allowance per query and document pair for the reranker’s prompt template. For a per-search model it is the number of search units the chunk rule gives.
When a provider reports no billable count, or reports zero, the call is charged at the estimate made before the call, never at zero. The response
cost then holds that amount.
Regions, guardrails and tags
- Regions.
provider/model@regionis accepted when the model lists that region inGET /v3/rerank/models. A region the model does not offer answers400, and a region that contradicts the regional endpoint you called answers451. - Guardrails. Your organization’s guardrail model rules apply, and a model they do not allow answers
403. - Tags. The
tagsfield and theX-EdenAI-Tagsheader both apply.
What rerank does not support
- Model routing.
@edenaiis refused with400. Name a rerank model directly, for examplevertex/semantic-ranker-default-004. - Model names without a provider.
semantic-ranker-default-004answers400. Name it asprovider/model, for examplevertex/semantic-ranker-default-004. - Models that are not rerank models. A chat model such as
openai/gpt-5answers400before any provider is called. - Fallbacks.
fallbacksanswers400. Send one model per request. - Routing preferences other than zero data retention. With a named
provider/modelthere is no provider to choose, sosort,order,allowed_providers,ignored_providersandmax_pricehave no effect. - Routing policies. A key’s default routing policy does not apply, and
policy/{name}is not a rerank model. - Non-text documents.
documentsis a list of strings. Send the text of each passage; images and structured objects are refused with422. - More than 1,000 documents or an empty list. Both answer
422.
Errors
Related
- Embeddings for the first retrieval step.
- Listing models for the shared model listing parameters.
- Provider data policies for retention per provider.