models

VoyageAI by MongoDB: rerank-2.5

Markdown · JSON

VoyageAI by MongoDB: rerank-2.5

rerank-2.5 reorders a supplied set of text candidates by relevance to a query and optional natural-language instructions. It is a multilingual, quality-oriented reranker with a 32,000-token query–document context and ranked scores tied to the original candidate indices.

About the model

This description covers the model’s capabilities. Available in Ailoot inputs, outputs and options are listed for the selected method below.

rerank-2.5 is Voyage AI's instruction-following reranker, designed to refine a set of search candidates. It jointly examines the query and each document as a cross-encoder, then returns a relevance ordering. The maker's release emphasizes natural-language control over what counts as relevant, multilingual retrieval and a longer query–document context than the preceding rerank-2 edition.

Give the model the candidates to compare

The input is a query and a list of candidate text documents. These can be passages selected by embedding search or a lexical first-stage search. The reranker evaluates the supplied text rather than creating corpus embeddings, so its practical job is to refine the candidates the initial search already found.

Keep the original candidate ordering and source identifiers when preparing that list. The returned indices refer to those input positions. For a RAG task, supply the passages the answer stage might actually use, including the title or qualifications needed to interpret them. A relevant document that is absent from the submitted candidate set cannot appear as a newly found result of reranking.

Specify the intended notion of relevance

Instructions can be appended or prepended to the query. The release describes three useful roles: emphasize a particular part of a document, prefer a type of source and disambiguate the query with application context. These alter the relevance task presented to the model.

For a technical search, an illustrative instruction is “Prioritize passages that explain the failure and recovery behavior; introductory overviews are secondary.” For a research collection, specify whether the title, method or result matters most. For an ambiguous term, state the subject area the search is about. Keep the question and the instruction compatible, so one does not ask for a broad topic while the other silently changes the task.

These preferences guide relevance scoring. If the application has strict eligibility requirements—such as source version, date or access scope—prepare the eligible candidate set separately. The model's relevance instruction and a deterministic collection restriction serve different purposes.

Ranked output and later result use

Results are ordered by descending relevance and include a floating-point relevance score and the candidate's original input index. The top-k option selects how many leading results to return; without it, the manufacturer specification returns results for all submitted candidates. An optional return-documents setting includes the corresponding source text; otherwise the response contains indices and scores.

Use the ordering to select passages for display or a later answer stage, keeping their source identity intact. Inspect the actual text when evaluating the ranking: the score is a measure of relevance to the submitted query, not a generated answer or a verification that the document's claims are correct. This makes the model useful for refining technical, legal, financial, medical, conversation and multilingual search material without converting ranking into a domain conclusion.

Context, total-token budget and truncation

The documented query limit is 8,000 tokens, including instructions placed in the query. The query plus any one candidate document must fit within 32,000 tokens, and the document list can contain at most 1,000 items. The total allowance is 600,000 tokens, counted as query tokens multiplied by the number of documents, plus all document tokens. A long instruction is therefore counted repeatedly across the candidate pairs.

The output top-k count does not change the number of candidates in that input-token calculation. Default truncation shortens over-length queries or documents to meet the context limit; disabling it makes an over-length query or pair return an error. Prepare answer-bearing passages deliberately and keep the relevant qualification within the text the model will see. Evaluate the refined order on representative questions and instructions, then pass the selected original passages to the next stage.

Ailoot Ultra · Rerank POST /v1/rerank voyageai/rerank-2.5

voyageai/rerank-2.5

VoyageAI by MongoDB /voyageai/rerank-2.5

Overview

rerank-2.5 reorders a supplied set of text candidates by relevance to a query and optional natural-language instructions. It is a multilingual, quality-oriented reranker with a 32,000-token query–document context and ranked scores tied to the original candidate indices.

Accepted inputs
Text
Results
Ranked results

Available in Ailoot · inputs & methods

Ailoot Ultra · Rerank POST /v1/rerank
Input types
text
Output types
rerank
Output format
json
FieldTypeRequirementValues & limitsDefault
FielddocumentsTypearrayRequirementRequiredValues & limitsDefault—
FieldmodelTypestringRequirementRequiredValues & limits
voyageai/rerank-2.5
Default—
FieldproviderTypeschemaRequirementOptionalValues & limitsDefault—
FieldqueryTypestringRequirementRequiredValues & limitsDefault—
Fieldsession_idTypestringRequirementOptionalValues & limitsDefault—
Fieldtop_nTypeintegerRequirementOptionalValues & limits
Minimum: 1
Default—
FieldtraceTypeschemaRequirementOptionalValues & limitsDefault—
FielduserTypestringRequirementOptionalValues & limitsDefault—
Fielddocuments[].textTypestringRequirementOptionalValues & limitsDefault—
Fielddocuments[].imageTypestringRequirementOptionalValues & limitsDefault—
Input material combinations

text_rerank · Required: query, documents array with minItems1

Method parameters and lifecycle
ParameterContract
Parametercontent_typeContractapplication/json
ParameterrequiredContractmodel, query, documents
Parametermaterial_typesContracttext
Parameteroptional_controlsContractprovider, session_id, top_n, trace, user
Parametermultimodal_input_bindingContractnull

Lifecycle: synchronous

Send the exact model ID and retain the complete native response.

Pricing

Tariff references do not add request options. Supported parameters are listed for the selected method.

Fast mode
Not specified When fast mode is selected
Flex mode
Not specified When flex mode is selected
Maximum reasoning effort
Not specified When maximum reasoning effort uses the default adjustment

Ailoot rates

Prices by configuration

Match each charge to the conditions shown. Use one rate for each set of alternative configurations.

ConfigurationRate scheduleBilling unitCharge
ConfigurationBase token ratesRate scheduleBase rateBilling unit—Charge
Input · Input tokens — / 1K tokens
Output · Output tokens — / 1K tokens
Input · Cache read — / 1K tokens
Input · Cache write — / 1K tokens
Input · Cache write, 1 hour — / 1K tokens
ConfigurationUltraRate schedule—Billing unit/ 1K tokensCharge
Input · input token $0.0001 / 1K tokens

Ailoot reserves an estimated amount before a request. After the result, it settles the final charge from measured usage. Streaming settlement uses the final usage record. How reservation and settlement work →

Example requests

Ailoot Ultra · Rerank

Retained official request structure; documentary exampleUse your actual request material and retain the complete result
{
  "documents": [
    "Paris is the capital of France.",
    "Berlin is the capital of Germany."
  ],
  "model": "voyageai/rerank-2.5",
  "query": "What is the capital of France?",
  "top_n": 3
}
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_REQUEST_FILE:?Set your actual JSON request file}"
export AILOOT_REQUEST_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads(Path(os.environ['AILOOT_REQUEST_FILE']).read_text(encoding='utf-8'))
if not isinstance(p,dict): raise SystemExit('Request must be a JSON object')
p['model']='voyageai/rerank-2.5'
Path('request.json').write_text(json.dumps(p,ensure_ascii=False),encoding='utf-8')
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/rerank \
  -H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
print(json.dumps(json.loads(Path('result.json').read_text()),ensure_ascii=False,indent=2))
PY_RESULT

Receive and save results

Ailoot Ultra · Rerank

json

Keep all completed results

Keep every complete returned response, file and content part.

Every actual result index, finite relevance_score and original document object is retained. Indices bind the original document array. Entire original JSON is stored and returned only after settlement.

If the original response needs checking

Preserve original operation and full/partial reply; do not replay POST.

Response fields
FieldType
FieldmodelTypestring
FieldidTypestring
FieldproviderTypestring
Fieldresults[].indexTypeinteger
Fieldresults[].relevance_scoreTypenumber
Fieldresults[].document.textTypestring
Fieldresults[].document.imageTypestring
Fieldusage.search_unitsTypeinteger
Fieldusage.total_tokensTypeinteger
Fieldusage.costTypenumber
Errors and next steps
ResponseConditionNext step
Response400 · invalid_request_errorConditionInvalid required field, representation or valueNext stepCorrect the indicated request field.

Aliases

Model aliases

Ailoot Ultra voyageai/rerank-2.5

Method path aliases

Use the method paths shown above.

Related caller IDs

voyageai/rerank-2.5

FAQ · VoyageAI by MongoDB: rerank-2.5
What inputs and results are available?

POST /v1/rerank · voyageai/rerank-2.5: text → rerank

Which fields does the request use?

POST /v1/rerank · voyageai/rerank-2.5: documents, model, provider, query, session_id, top_n, trace, user

What limits apply?

POST /v1/rerank · voyageai/rerank-2.5: top_n.minimum: 1

More details

Connect Ailoot to Claude Code, OpenCode, Hermes or your own app.

The company and its project portfolio

The company and its project portfolio: millions of customers; monthly sales in the billions.

Buy tokens at a discount.

Subscription discounts for regular use. Promo codes offer up to 50% off token purchases.

Subscription
Choose a discounted plan for your regular requests.
Promo code: up to 50% off
Enter your code at checkout. The price updates to reflect the current promotion.
Spending in your history
The model, tokens and amount are recorded for each request.

Choose a subscription · View model prices

Connect the API to a product you sell.

Use Ailoot in SaaS, apps and bots under its official service offer and licence agreement. Request a reseller licence for resale.

Commercial application
Add text, image, video and audio generation to paid features in your service.
Reseller licence
Send a description of your project and how you provide access. Request written terms for use and resale.
Documents on the website
The service offer, licence agreement and data processing policy are available before you connect.

Request a reseller licence · Service offer and licence agreement