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

# Configure Provider Keys

> Choose managed or BYOK credentials for router traffic.

Each provider used by a router needs one key source:

* `managed` uses Dari's provider account.
* `user` uses your provider key.

OpenRouter and xAI are BYOK-only — set their source to `user` and supply an API key. Configure both in `router.yml`. Read BYOK values from environment variables rather than storing secrets in YAML:

```yaml theme={null}
provider_key_sources:
  openai: managed
  fireworks: user
  openrouter: user
provider_key_envs:
  fireworks: FIREWORKS_API_KEY
  openrouter: OPENROUTER_API_KEY
```

When a model is bound to OpenRouter via `model_providers`, Dari sends requests to OpenRouter using that key and forwards strict zero-data-retention routing controls. Your application still sends only its Dari Routing API key. Dari uses the configured provider credential after selecting a model.

You can also choose key sources from the router's **Keys** page in the [Dari Dashboard](https://app.dari.dev). Organization-registered custom models use the credential saved with the model instead of a router-level provider key.
