Overview
Provider credentials are the API keys and tokens you use to authenticate with AI providers like OpenAI, Anthropic, Google, and others. ModelRiver encrypts these credentials at rest and never exposes them in the UI once saved.
How credentials are stored
- Encrypted at rest using industry-standard encryption
- Masked in the UI: only the last 4 characters are visible after saving
- Never returned via API: credentials cannot be retrieved, only overwritten
- Isolated per project: each project has its own credential store
Adding provider credentials
- Navigate to Settings → Providers in your project
- Select the provider (OpenAI, Anthropic, Google, etc.)
- Enter the API key or token
- Click Save
The credential is encrypted and stored immediately.
Rotating credentials
To rotate a provider credential:
- Generate a new API key from the provider's dashboard
- Navigate to Settings → Providers in ModelRiver
- Overwrite the existing credential with the new key
- Verify functionality with a test request
- Revoke the old key from the provider's dashboard
Alternatively, delete the existing credential and create a new entry.
Error handling
Missing or invalid credentials surface clear errors:
| Error | Cause | Fix |
|---|---|---|
provider_credentials_missing | No credentials configured for this provider | Add credentials in Settings → Providers |
provider_auth_failed | Credentials are expired or revoked | Rotate credentials with a valid key |
provider_rate_limited | Provider-side rate limit exceeded | Configure fallback providers in your workflow |
Best practices
- Use dedicated keys: Create provider-specific API keys for ModelRiver rather than sharing keys across services.
- Set spending limits: Configure spending caps on provider dashboards to prevent unexpected costs.
- Monitor provider health: Use ModelRiver's Observability to track provider error rates and latency.
- Test after rotation: Always verify credentials work after rotation before revoking old keys.
Next steps
- Data retention: Understand data storage and purge policies
- Compliance: Audit trails and regulatory considerations
- Troubleshooting: Diagnose credential-related issues