How provider configuration works
By default, Portrix uses its shared provider keys to fulfill your requests. When you add your own provider API keys to your Portrix account, Portrix routes your requests through your accounts instead. This means usage is billed directly to you by the upstream provider, and any existing credits, volume discounts, or quota increases you have with that provider apply automatically. This model gives you the best of both worlds: the simplicity of a single unified API with the control and cost transparency of direct provider relationships.Adding provider keys
1
Open the Portrix dashboard
Go to app.portrix.ai and sign in to your account.
2
Navigate to Settings > Providers
Click your account avatar in the top-right corner, then select Settings. Choose Providers from the left navigation menu.
3
Add a new provider
Click the Add Provider button in the top-right corner of the Providers page.
4
Select the provider
Choose the provider you want to configure from the list — for example, OpenAI, Anthropic, Google, or Mistral.
5
Enter your API key
Paste your API key for that provider into the key field. You can find your API keys in each provider’s own dashboard.
6
Save the configuration
Click Save. Portrix will validate the key and confirm the connection is active.
Supported providers
The following providers are supported for bring-your-own-key configuration:Testing provider connections
After adding a key, use the Test Connection button on the Providers settings page to send a small test request through your configured key. Portrix will show you a success confirmation or a detailed error message if something is misconfigured. You can also verify a connection by making a simple API call and inspecting the response headers. Thex-portrix-provider response header indicates which upstream provider fulfilled the request.
Priority and fallback
When you configure multiple API keys for the same provider — for example, several OpenAI keys across different projects — Portrix can distribute traffic between them in two modes:- Round-robin: Requests are distributed evenly across all active keys for that provider.
- Failover: Portrix uses the primary key and automatically switches to secondary keys if the primary returns an error or hits a rate limit.