# OpenRouter APIs — Cohere: Rerank v3.5 (cohere/rerank-v3.5)

Guide for calling every confirmed OpenRouter API that serves `cohere/rerank-v3.5`.

Model page: https://openrouter.ai/cohere/rerank-v3.5
Create an API key: https://openrouter.ai/settings/keys

## Pricing

Standard-variant prices for `cohere/rerank-v3.5`, per provider, in the unit each provider bills (tokens, images, seconds of video, or characters of audio). Pay-as-you-go with no markup on the provider's price.

- Amazon Bedrock: $0.002/search
- Cohere: $0.001/search

Full price table, including other variants and per-request charges: https://openrouter.ai/cohere/rerank-v3.5
How OpenRouter prices requests: https://openrouter.ai/pricing

## EU in-region routing

`cohere/rerank-v3.5` is available through EU in-region routing. Requests sent to eu.openrouter.ai are decrypted in the EU and routed only to shared provider endpoints in Europe (the EU/EEA, the UK, and Switzerland).

- Providers in Europe: Amazon Bedrock
- Prices in Europe:
  - Amazon Bedrock: $0.002/search
- Base URL: https://eu.openrouter.ai/api/v1
- Plan: requires Business or Enterprise. Self-serve on Business: no contract, no monthly minimum. https://openrouter.ai/business/eu
- Fails closed: if no shared provider endpoint in Europe is available, the request errors instead of leaving the region. Requests served by your own BYOK key go to your deployment’s region, which you control.

Docs: https://openrouter.ai/docs/guides/features/in-region-routing

## Authentication

Send this header with every request:

- Authorization: Bearer $OPENROUTER_API_KEY

## Rerank API

Rank documents by relevance to a query with `cohere/rerank-v3.5` through OpenRouter's Rerank API.

Docs: https://openrouter.ai/docs/api/api-reference/rerank/submit-a-rerank-request

### Endpoint

POST https://openrouter.ai/api/v1/rerank

Headers:
- Content-Type: application/json

### Request fields (cohere/rerank-v3.5)

- model: string (required) — `"cohere/rerank-v3.5"`
- query: string (required) — the search query
- documents: string[] (required) — the documents to rank
- top_n: integer (optional) — return only the highest-scoring documents

### Response

JSON with the documents sorted by relevance score, highest first:

```json
{
  "results": [{ "index": 0, "relevance_score": 0.98, "document": { "text": "Paris is the capital of France." } }]
}
```

### Examples

#### Rerank documents

```bash
curl https://openrouter.ai/api/v1/rerank \
      -H "Content-Type: application/json" \
      -H "Authorization: Bearer $OPENROUTER_API_KEY" \
      -d '{
        "model": "cohere/rerank-v3.5",
        "query": "What is the capital of France?",
        "documents": [
          "Paris is the capital of France.",
          "London is the capital of England.",
          "Berlin is the capital of Germany."
        ],
        "top_n": 3
      }'
```

## Errors

Failures return `{"error": {"code": <number>, "message": <string>}}` with the HTTP status:

- 400 — malformed request or an unsupported parameter
- 401 — missing or invalid API key
- 402 — insufficient credits
- 403 — spend limit reached, key disabled, or access blocked
- 404 — unknown model or no provider can serve the request
- 429 — rate limited; retry with backoff
- 502 — the operation failed upstream; failed generations are not billed

---

Canonical version of this document: https://openrouter.ai/cohere/rerank-v3.5/llms.txt
