Overview
ARouter supports both platform credits and the option to bring your own provider keys (BYOK). When you use your own keys, requests are routed through your provider account while keeping all ARouter features — unified API, failover, analytics, and spend controls. Your provider keys are securely encrypted and automatically prioritized for routing. No code changes needed — just add your keys in the dashboard and your existing ARouter API key works as before.How It Works
- Add your provider API key in Settings → Integrations.
- ARouter automatically uses your key for that provider.
- If your key is unavailable, ARouter can fall back to platform keys (configurable).
- Usage is tracked separately: BYOK vs. platform.
Supported Providers
ARouter supports BYOK for any provider with one of these credential types:| Credential Type | Providers | Required Fields |
|---|---|---|
| API Key | OpenAI, Anthropic, DeepSeek, xAI, Mistral, and more | API key |
| Azure | Azure OpenAI | API key, endpoint URL, deployment name |
| Bedrock | AWS Bedrock | Access key, secret key, region |
| Vertex AI | Google Vertex AI | Service account JSON, region |
Adding a BYOK Key
Dashboard
- Go to Settings → Integrations.
- Click Add Provider Key.
- Select your provider and credential type.
- Enter your key/credentials.
- (Optional) Click Test Key to verify it works.
- Click Save.
Advanced Options
When adding a key, you can configure:| Option | Description | Default |
|---|---|---|
| Label | A name for this key (e.g. “Production”) | — |
| Always use this key | Never fall back to platform keys | Off (allow fallback) |
| Weight | Routing weight when you have multiple keys for the same provider | 1 |
| RPM Limit | Max requests per minute for this key | Unlimited |
| Base URL | Custom endpoint URL | Provider default |
| Region | Preferred region for routing | Any |
| Supported Models | Restrict this key to specific models | All models |
| Daily/Monthly Budget | Spending limit in USD | Unlimited |
Fallback Behavior
By default, if your BYOK key encounters a rate limit or error, ARouter falls back to platform keys seamlessly. You can change this per key:| Fallback Policy | Behavior |
|---|---|
| Allow (default) | Fall back to platform keys when BYOK is unavailable |
| Deny | Reject the request if BYOK key is unavailable |
Multiple Keys
You can add multiple BYOK keys for the same provider. ARouter uses weighted random selection across all available keys. Configure the weight field to control traffic distribution.BYOK Usage Tracking
BYOK requests are tracked separately in your usage dashboard:- BYOK Requests — number of requests using your keys
- Estimated BYOK Spend — estimated cost based on provider pricing
- Platform Spend — cost of requests using platform keys
Azure Configuration
For Azure OpenAI, provide your key configuration as JSON:AWS Bedrock Configuration
For AWS Bedrock, provide your AWS credentials:Google Vertex AI Configuration
For Vertex AI, provide your service account credentials:Debugging BYOK Issues
If BYOK requests fail:- Go to Settings → Integrations and check the key health status.
- Click the key to see the last error message.
- Use the Test Key button to verify the key is still valid.
- Check the Usage page for BYOK-specific error rates.
| Symptom | Cause | Fix |
|---|---|---|
invalid x-api-key | Key is expired or revoked | Generate a new key from your provider |
| Key shows unhealthy | Too many errors triggered cooldown | Wait for cooldown to expire, or edit and re-enable |
| Requests not using BYOK | Provider/model mismatch | Check the key’s supported models and region |
| Fallback to platform | BYOK key rate-limited | Increase RPM limit or add more keys |