> ## Documentation Index
> Fetch the complete documentation index at: https://docs.loongclaw.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenRouter

> Configure the OpenRouter provider profile in Loong.

# OpenRouter

Use this when one aggregation or routing layer should sit in front of multiple upstream model vendors while staying explicit in config.

## At A Glance

| Field            | Value                                           |
| ---------------- | ----------------------------------------------- |
| Built-in kind    | `openrouter`                                    |
| Provider group   | Gateway And Compatibility Providers             |
| Protocol family  | `openai_chat_completions`                       |
| Feature family   | `openai_compatible`                             |
| Auth scheme      | `bearer`                                        |
| Credential envs  | OPENROUTER\_API\_KEY                            |
| Aliases          | `openrouter_compatible`                         |
| Default base URL | `https://openrouter.ai`                         |
| Request endpoint | `https://openrouter.ai/api/v1/chat/completions` |
| Models endpoint  | `https://openrouter.ai/api/v1/models`           |

## Minimal Config

```toml theme={null}
active_provider = "openrouter"

[providers.openrouter]
kind = "openrouter"
api_key = { env = "OPENROUTER_API_KEY" }
model = "auto"
```

## Verify It

```bash theme={null}
loong doctor
loong runtime models list
loong ask --message "Say hello and name the active provider."
```

If `runtime models list` is unreliable for this account or region, pin an explicit `provider.model` or add `preferred_models` instead of leaving recovery implicit.

## Auth And Routing Contract

| Contract                    | Value                                           |
| --------------------------- | ----------------------------------------------- |
| Auth optional               | no                                              |
| Model probe auth optional   | no                                              |
| Default API key env         | `OPENROUTER_API_KEY`                            |
| OAuth env                   | none                                            |
| Primary request route       | `https://openrouter.ai/api/v1/chat/completions` |
| Primary model-catalog route | `https://openrouter.ai/api/v1/models`           |

## Related Docs

* Continue to [Providers And Models](/use-loong/providers-and-models) when you still need the broader chooser page.
* Continue to [Provider Guides](/use-loong/provider-guides/index) for the full built-in provider matrix.
* Continue to [Provider Recipes](/use-loong/provider-recipes) for representative rollout recipes.
* Continue to [Configuration Patterns](/use-loong/configuration-patterns) for the shared provider-profile shape.
