API Keys & Model Providers
Reliant supports multiple AI model providers, allowing you to choose the best models for your workflow. You can configure API keys through environment variables, configuration files, or the Settings UI.
Quick Start
Using an Existing Claude Code Subscription
If you already have a Claude Code subscription, you can use it with Reliant:
Get your API key by running this command in your terminal:
claude setup-tokenFollow the authentication flow that opens in your browser
Copy the API key shown after authentication
Configure Reliant using one of these methods:
Option A: Settings UI
- Open Reliant Settings
- Navigate to AI Providers
- Select “Anthropic” provider
- Paste your API key
- Click “Save” or “Test Connection”
Option B: Environment Variable
export ANTHROPIC_API_KEY="your-api-key-here"Option C: Configuration File (
.reliant.json){ "providers": { "anthropic": { "apiKey": "your-api-key-here" } } }
Supported Providers
Reliant supports the following AI model providers:
Anthropic (Claude)
Available Models: Claude 4.5 Sonnet, Claude 4 Opus, Claude 3.7 Sonnet, Claude 3 Haiku
Configuration:
export ANTHROPIC_API_KEY="sk-ant-..."
Or in .reliant.json:
{
"providers": {
"anthropic": {
"apiKey": "sk-ant-...",
"disabled": false
}
}
}
Getting an API Key:
- Sign up at console.anthropic.com
- Or use existing Claude Code subscription (see Quick Start above)
OpenAI
Available Models: GPT-5, GPT-4.1, GPT-4.1-mini, GPT-4.1-nano
Configuration:
export OPENAI_API_KEY="sk-..."
Or in .reliant.json:
{
"providers": {
"openai": {
"apiKey": "sk-...",
"disabled": false
}
}
}
Getting an API Key:
- Sign up at platform.openai.com
- Navigate to API Keys section
- Create new secret key
Google Gemini
Available Models: Gemini 2.5 Pro, Gemini 2.5 Flash
Configuration:
export GEMINI_API_KEY="..."
Or in .reliant.json:
{
"providers": {
"gemini": {
"apiKey": "...",
"disabled": false
}
}
}
Getting an API Key:
- Visit ai.google.dev
- Sign in with Google account
- Create API key in API Keys section
GitHub Copilot
Configuration:
export GITHUB_TOKEN="ghp_..."
Or in .reliant.json:
{
"providers": {
"copilot": {
"disabled": false
}
}
}
Getting Access:
- Requires active GitHub Copilot subscription
- Generate token at github.com/settings/tokens
- Needs
copilotscope
OpenRouter
Configuration:
export OPENROUTER_API_KEY="sk-or-..."
Or in .reliant.json:
{
"providers": {
"openrouter": {
"apiKey": "sk-or-...",
"disabled": false
}
}
}
Getting an API Key:
- Sign up at openrouter.ai
- Navigate to Keys section
- Create new API key
Azure OpenAI
Configuration:
export AZURE_OPENAI_ENDPOINT="https://your-resource.openai.azure.com"
export AZURE_OPENAI_API_KEY="..." # Optional if using Entra ID
export AZURE_OPENAI_API_VERSION="2024-02-15-preview"
Or in .reliant.json:
{
"providers": {
"azure": {
"endpoint": "https://your-resource.openai.azure.com",
"apiKey": "...",
"apiVersion": "2024-02-15-preview",
"disabled": false
}
}
}
Setup:
- Requires Azure subscription with OpenAI resource
- Find endpoint in Azure Portal under your OpenAI resource
- API key available in Keys and Endpoint section
AWS Bedrock (Claude)
Configuration:
export AWS_ACCESS_KEY_ID="..."
export AWS_SECRET_ACCESS_KEY="..."
export AWS_REGION="us-east-1"
Or in .reliant.json:
{
"providers": {
"bedrock": {
"accessKeyId": "...",
"secretAccessKey": "...",
"region": "us-east-1",
"disabled": false
}
}
}
Setup:
- Requires AWS account with Bedrock access
- Enable Claude models in AWS Bedrock console
- Create IAM user with Bedrock permissions
- Generate access keys in IAM console
Groq
Configuration:
export GROQ_API_KEY="gsk_..."
Or in .reliant.json:
{
"providers": {
"groq": {
"apiKey": "gsk_...",
"disabled": false
}
}
}
Getting an API Key:
- Sign up at console.groq.com
- Navigate to API Keys
- Create new API key
Vertex AI (Google Cloud)
Configuration:
export VERTEXAI_PROJECT="your-gcp-project-id"
export VERTEXAI_LOCATION="us-central1"
Or in .reliant.json:
{
"providers": {
"vertexai": {
"project": "your-gcp-project-id",
"location": "us-central1",
"disabled": false
}
}
}
Setup:
- Requires Google Cloud Platform account
- Enable Vertex AI API in GCP console
- Authenticate using
gcloud auth application-default login
xAI (Grok)
Configuration:
export XAI_API_KEY="xai-..."
Or in .reliant.json:
{
"providers": {
"xai": {
"apiKey": "xai-...",
"disabled": false
}
}
}
Getting an API Key:
- Sign up at console.x.ai
- Navigate to API Keys section
- Generate new key
Local Models
Configuration:
export LOCAL_ENDPOINT="http://localhost:1234/v1"
Or in .reliant.json:
{
"providers": {
"local": {
"endpoint": "http://localhost:1234/v1",
"disabled": false
}
}
}
Compatible Servers:
Configuration Priority
Reliant checks for configuration in this order:
- Environment Variables (highest priority)
- Configuration File (
.reliant.json) - Settings UI (stored in config file)
Environment variables override configuration file settings, allowing temporary changes without modifying files.
Testing API Keys
After configuring a provider:
- Open Reliant Settings
- Navigate to the AI Providers section
- Find your configured provider
- Click “Test Connection” or “Validate”
- Verify you see a success message
Common Issues
“Invalid API Key” Error
Solutions:
- Verify key is copied correctly with no extra spaces
- Check key hasn’t expired (regenerate if needed)
- Ensure you’re using the correct provider (e.g., Anthropic key for Claude models)
- For Claude Code keys, verify they’re still active
“Rate Limit Exceeded”
Solutions:
- Wait before sending more requests
- Check your provider’s rate limits for your tier
- Consider upgrading your plan
- Use a different API key or provider temporarily
Provider Not Showing in UI
Solutions:
- Restart Reliant after configuration changes
- Check configuration file syntax (JSON must be valid)
- Ensure provider isn’t marked as
"disabled": true
Connection Timeout
Solutions:
- Verify internet connection
- Check firewall settings
- For local models, ensure server is running
- Disable VPN temporarily to test
Security Best Practices
Never Commit API Keys
Add to .gitignore:
.reliant.json
.env
Use Environment Variables for CI/CD
In CI/CD pipelines, set API keys as secret environment variables:
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
Rotate Keys Regularly
- Rotate API keys every 90 days
- Immediately rotate if a key may have been exposed
- Use different keys for development and production
Limit Key Permissions
Where possible:
- Use read-only or limited-scope keys
- Create separate keys for different projects
- Monitor key usage in provider dashboards
Rate Limits and Billing
Different provider tiers have different limits:
Free Tiers
- Usually have strict rate limits (e.g., 5 requests/minute)
- Lower token allowances
- May have daily caps
Paid Tiers
- Higher rate limits (e.g., 50-100 requests/minute)
- Pay-per-token pricing
- No daily caps (but cost limits)
Enterprise Tiers
- Custom rate limits
- Volume discounts
- Dedicated support
Check your provider’s documentation for specific limits and pricing.
Related Topics
- Custom Agents - Configure which models agents use
- MCP Servers - Extend capabilities with external tools
- Troubleshooting - Solve common API key issues