Skip to main content
Portrix can route requests through your own provider API keys, letting you consolidate billing, apply your own rate limits, and use existing provider credits — all without changing your application code.

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:
Treat provider API keys with the same care as passwords. Portrix encrypts all stored keys at rest using AES-256 encryption and never exposes them in plaintext after the initial save.

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. The x-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.
Configure this behavior per-provider on the Settings > Providers page. You can also combine provider-level fallback with Portrix’s cross-provider fallback routing to build highly resilient request pipelines.