Concept

What is BYOK for LLM APIs?

BYOK (bring your own key) for LLM APIs means giving a gateway your own provider API keys so that requests routed through the gateway run on your provider accounts. The provider bills you directly and applies your account's rate limits and pricing, while the gateway still handles routing, failover, access control and logging. The alternative is to use the gateway's own provider keys and pay the gateway for usage. In FastRouter, BYOK is also called External Keys.

Last updated

Key facts

  • BYOK means a gateway calls model providers with your API keys instead of its own.
  • With BYOK, the provider bills you directly and your account's rate limits and discounts apply.
  • FastRouter encrypts BYOK credentials at rest and never returns them in API responses after saving.
  • In FastRouter, only Organization Owners can create, modify or delete BYOK credentials.
  • FastRouter plans include 1 BYOK key on Starter, 10 on Pro and 50 on Business.

What does BYOK mean for LLM APIs?

BYOK stands for bring your own key. You create API keys in your own accounts with model providers and store them in a gateway. When your application sends a request to the gateway, the gateway attaches your key and forwards the request to the provider on your account.

Your application does not change how it calls the gateway. It still authenticates with a gateway key, and the provider key stays inside the gateway. What changes is whose provider account the request runs on, and therefore who is billed and whose limits apply.

How is BYOK different from using a gateway's own keys?

With a gateway's own keys, the gateway holds the provider relationship: it pays the provider and charges you, for example through prepaid credits, and requests share the gateway's provider quotas. With BYOK, you hold the provider relationship, so the provider invoices you and your own quotas and contract terms apply.

Gateway-managed keys are quicker to start with, because one account gives access to many providers without signing up with each one. BYOK takes more setup, since you need an account and a key for every provider you want to use, but it keeps the provider relationships you already have.

When does BYOK make sense?

BYOK makes sense when you already have provider accounts whose terms you want to keep. Typical reasons are negotiated or committed pricing, rate limits granted to your account, provider credits you want to spend, and compliance or procurement rules that require a direct contract with the provider.

  • You have negotiated pricing or committed spend with a provider.
  • Your provider account has higher or more predictable rate limits than a shared pool.
  • Your organization requires provider usage to appear on its own provider invoices.
  • You want to separate environments or teams by using different provider accounts.
  • You run fine-tuned or privately hosted models that only your account can reach.

What should you check before giving a gateway your provider keys?

A provider key gives access to your provider account, so check how the gateway protects it. The main points are whether keys are encrypted at rest, whether a saved key can be read back, who is allowed to add or change keys, and whether each request records which key was used.

  • Storage: keys should be encrypted at rest and not shown again after saving.
  • Permissions: adding, changing and deleting keys should be limited to a small set of roles.
  • Scope: a key should be restrictable to the projects or teams that need it.
  • Audit: request logs should show which key or integration served each request.
  • Rotation: replacing a key should not require application changes.

How does FastRouter handle BYOK?

In FastRouter, BYOK is configured under Setup, External Keys. An Organization Owner creates an integration that pairs a provider with credentials and a model selection, gives it a unique Provider Slug, and scopes it to all projects or specific projects. Requests then run on that provider account.

Credentials are encrypted at rest and never returned in API responses after saving. Only Organization Owners can create, modify or delete them. Project Admins and Project Members can use integrations within their project scope but cannot edit the credentials. The Provider Slug can be referenced in Virtual Models and in Gateway Configs for fallback and load balancing, and it appears in the Activity Log on every request.

Plans differ in how many BYOK keys and BYOK requests they include: Starter has 1 key and 1M requests per month, Pro has 10 keys and 5M, Business has 50 keys and 50M, and Enterprise terms are negotiated. See the pricing page for the full comparison.

BYOK compared with FastRouter credits
AspectBYOK (your provider keys)FastRouter credits
Billing sourceYour provider accountFastRouter credits
Rate limits governed byYour provider accountFastRouter key pools
Negotiated provider discounts keptYesNo
Routing and failoverYesYes
Governance and access controlsYesYes
Logs, traces and observabilityYesYes

Sources

Where the statements about FastRouter on this page come from.

FAQ

Common questions

FastRouter supports OpenAI, Anthropic Claude, Google AI Studio, Google Vertex AI, Microsoft Azure, Groq, Together AI, Fireworks AI, DeepInfra, Baseten, Nebius, Perplexity AI, Moonshot, Minimax, X-AI, FAL AI and Pollo AI. Most use an API key. Google Vertex AI uses a Service Account JSON file, and Microsoft Azure requires a resource name and deployment configuration.

You pay the provider directly. Because requests use your own provider keys, costs and rate limits are governed by your provider account and not by the gateway's shared key pools. In FastRouter, you keep your provider billing, quotas and any negotiated discounts while routing through the gateway.

The free Starter plan includes 1 BYOK key with a limit of 1M BYOK requests per month. Pro includes 10 keys and 5M requests per month, and Business includes 50 keys and 50M requests per month. On Enterprise, the number of keys and the request limit are negotiated.

Yes. Within an integration you can turn FastRouter catalog models on or off, and use Add Custom Model to register fine-tuned or privately hosted models. A custom model has its own model slug and can have an optional base model, a custom host, and pricing used for cost tracking.

Yes. You can run multiple integrations for the same provider, each scoped to different projects, for example one for production and one for research. Each integration has its own Provider Slug, and the Activity Log shows which slug was used on every request.

Try it on your own traffic

Point your existing OpenAI-compatible client at FastRouter and send a request. Free to start, no credit card required.