Document rerank

by Rerank

rerank/voyage

Rank documents against a query.

Billed per
token
Price
Price: —
Provider
Rerank
Timeout
1 min

Overview

Scores and orders documents by relevance to a query, using the selected reranker.

Ordered document indexes with relevance scores and model information.

Input

These go in the input object of the run request.

FieldTypeRequiredDescription
querystringYesQuery to rank against.
documentsarrayYesOne to 1000 nonempty document strings.
top_kintegerNoMaximum number of results, up to 100.
Minimum: 1
Maximum: 100
modelstringNoReranking model.
Allowed: rerank-3, rerank-3-lite, rerank-2.5, rerank-2.5-lite
Default: "rerank-3"

Requests up to 1 MB.

Example

Use your own API key and a saved idempotency key for each new job. Replace image or media placeholders with your own publicly reachable HTTPS URLs. Keep the same key and request body when recovering a timeout.

# Set once per job; reuse this key and the identical body after a timeout.
: "${AGENTSKY_IDEMPOTENCY_KEY:?Set a unique, saved key for this job}"
curl --fail-with-body https://gateway.agentsky.dev/v1/run \
  -H "authorization: Bearer $AGENTSKY_API_KEY" \
  -H "content-type: application/json" \
  -H "Idempotency-Key: $AGENTSKY_IDEMPOTENCY_KEY" \
  -d '{"provider":"rerank","endpoint":"voyage","input":{"query":"API gateways","documents":["An API gateway routes requests.","A recipe for bread."]}}'
# If status is READY/RUNNING, poll GET /v1/runs/{runId} with the same API key.

Pricing

— per token using your plan when signed in. Read the final customer charge from price.amount.value after the run finishes. A RUNNING response is not the final bill.

Questions