API Key Connections
RecommendedOpenAI · Anthropic · Google Gemini
- Made by providers for applications and teams.
- The right choice for shared and production use.
MFI AI Gateway runs on your own Linux server and puts your AI provider connections behind one OpenAI-compatible endpoint. When a connection stops answering, requests move to the next one that serves the same model, and your tools never notice.
A provider error, a revoked key or a dead network path moves the request to the next connection. People keep working.
Provider keys stay on the server. Hand out gateway keys instead, and revoke one without touching the rest.
See what requests cost and where the spend goes, by user, key, model and provider, over the time window you choose.
Prompts and responses pass through infrastructure you run. Nothing is relayed through us.
Overview usage range
Last 24 hours
Last 24 hours3 days7 days14 days1 month3 months
Every model has its own pool: the connections you've added that can serve it. Choose how the gateway uses it: failover, which moves a request on only when a connection fails, or load balancing, which spreads requests across the pool.
Your tool sends a normal OpenAI-style request with its gateway key.
Authorization: Bearer cg-…Connections are ranked by recent errors and health. A running session stays on the same connection.
sticky route: hitAn outage, an invalid key and a "wait until" are handled differently. If a provider says when a connection is usable again, the gateway holds it until then.
held until reset: 2h 14mThe answer goes back in the format your tool expects. Where the model has a price set, the request's cost is added to usage.
Failover stays inside a model's pool. A request for an OpenAI model fails over to your other connections for that model. It does not switch to a different provider's model, because the answer would change.
MFI AI Gateway doesn't include any AI usage. You connect your own keys and accounts, and the provider bills you directly as it does today.
OpenAI · Anthropic · Google Gemini
OpenAI · Anthropic · Google
Your plan's terms apply to how the account is used. For teams, use API Key Connections.
Give each project or client its own key, so spend and access stay separate and one can be closed without touching the others.
If a key is revoked, expires or stops working, the next one for that model takes over while you sort it out.
Run each account through its own proxy, or on the server's own connection.
Anything that accepts a custom OpenAI base URL works: the official SDKs, coding assistants and your own services. Point it at your gateway and keep the rest of the code.
POST /v1/chat/completionsChat CompletionsPOST /v1/responsesResponsesPOST /v1/messagesMessages formatGET /v1/modelsModels you've enabledclient = OpenAI( - base_url="https://api.openai.com/v1", + base_url="https://ai.your-company.com/v1", # your gateway - api_key="sk-...", + api_key="cg-...", # a gateway key )
- curl https://api.openai.com/v1/chat/completions \ + curl https://ai.your-company.com/v1/chat/completions \ - -H "Authorization: Bearer sk-..." \ + -H "Authorization: Bearer cg-..." \ -H "Content-Type: application/json" \ -d '{"model": "gpt-5.4", "messages": [...]}'
The installer checks your server, then sets up the gateway, its database and cache, a web server with a TLS certificate, and the firewall. When it finishes, the admin panel is live on your domain.
$ curl -fsSL https://download.mfimail.eu/install.sh | sudo bash
You should know where the line is before you buy.
It includes no model access and resells none. Usage is between you and your provider.
Each connection keeps its provider's own limits. Adding connections is for continuity and for keeping projects separate, not for raising a limit.
MFI AI Gateway licence
About US$13 · nothing renews automatically
Haven't activated your key? You can get your money back within 14 days. Refund Policy
[link: customer portal]Open a MAGCODE customer account with your email address, or sign in to the one you have.
Pay in the customer portal. A payment reference is reserved for you while the payment is confirmed.
Once the payment is confirmed, your licence key is in the customer portal. Show it whenever you need it and hide it again; it's hidden each time the page reloads.
Paste the key when the installer asks. It activates, and the gateway is ready on your domain.
MFI AI Gateway is software you run that connects to accounts you own. Providers make API keys for exactly this kind of use, and that's what we recommend for teams and production.
If you connect a personal plan by signing in, that plan's terms apply. Some personal plans don't permit use through third-party tools, so please check them first.
We can't speak for providers, but the gateway is built to treat them with respect. When a provider says a connection should wait until a certain time, the gateway records it at once and doesn't try that connection again until then.
Temporary network problems and errors that don't come from the provider are handled according to their type, and another route is tried when that makes sense. The gateway reads every response a provider sends and acts on it; it doesn't try to get around a block on its own.
How your connections are used is still governed by your provider's terms.
Every release is signed. Before installing or updating, the installer verifies the release signature, the archive's SHA-256 and its size, and refuses anything altered. At start-up, the gateway also compares its own binaries against the signed manifest that came with the release.
Yes. Watch the server's DNS lookups or network connections: the only traffic that comes to us is licence verification and update checks. The full list is in the install section, under "What reaches our licence server".
Any program that lets you set a custom base URL works with it: the official SDKs, coding assistants, editor extensions and your own code. If you find one that doesn't, open a support ticket in the customer portal and tell us which one.
A 30-day self-hosted licence. Your server, your accounts, one endpoint.