# OpenRouter

> Configure openrouter deployments and understand provider-specific behavior.

URL: https://boelabs.com/en/docs/ai-gateway/providers-openrouter
Language: English

## Configure a deployment

Send this body to `POST /admin/deployments` with an operator credential. Replace the example
credentials and choose a model available to your provider account. See
[Creating deployments](https://boelabs.com/docs/ai-gateway/creating-deployments) for the shared configuration fields.

```json
{
  "publicModel": "search-reranker",
  "adapterKey": "openrouter",
  "upstreamModel": "cohere/rerank-4-fast",
  "credentials": { "apiKey": "sk-or-..." }
}
```

## Behavior and limitations

- **Credentials**: `apiKey` is required. `baseUrl` and custom `headers` are optional. The default base
  URL is `https://openrouter.ai/api/v1`.
- **Operation**: reranking only in this release. The adapter sends `POST /rerank` through the native
  `openrouter_rerank` transport.
- **Provider routing**: the public `provider` object is preserved exactly and makes only OpenRouter
  deployments eligible for that request.
- **Model ids**: use OpenRouter's complete ids, including creator and suffixes such as `:free`.
- **Catalog**: the committed catalog is generated from OpenRouter's model feed filtered by
  `output_modalities=rerank`. No expected model count is hard-coded.
- **Text-only release**: multimodal source capability is reported by the sync but withheld from the
  public profile. The NVIDIA vision reranker therefore accepts text documents only for now.
- **Pricing**: ambiguous zero token fields do not mark paid rerankers free. Reviewed search-unit
  overrides are used where available; otherwise OpenRouter's response cost is the accounting fallback.

Catalog workflow:

```bash
bun run --filter @boelabs/ai-gateway-api catalog:sync:openrouter
bun run --filter @boelabs/ai-gateway-api catalog:sync:openrouter:verify
# To update the committed snapshot after review:
bun run --filter @boelabs/ai-gateway-api catalog:sync:openrouter:write
```

The report calls out multimodal capability not yet enabled, ambiguous zero pricing, orphaned reviewed
overrides, and paid models without a representable local cost.

## Next steps

- [Reranking](https://boelabs.com/docs/ai-gateway/reranking) — public contract, routing, validation, and examples.
- [Model catalog](https://boelabs.com/docs/ai-gateway/model-catalog#openrouter-rerank-sync) — sync ownership and schema.
- [Routing](https://boelabs.com/docs/ai-gateway/routing) — retries, fallback, health, and price strategy.

