Skip to main content
RouterBase has three kinds of keys. They look similar, do different things, and mixing them up is the single most common mistake when integrating.

The three kinds at a glance

Which one do I need?

“I’m just trying RouterBase out.” → API Key. Get one on the dashboard, put it in Authorization: Bearer, done.
“I’m building a product on top of RouterBase and want one key per end-user of my product.” → Management API Key. Keep it server-side; use it to mint a fresh API Key per signup. Each user gets their own rate limits and can be revoked independently.
“I already pay OpenAI / Anthropic / Google directly and want my RouterBase calls to bill against my existing account, not RouterBase’s.” → Register a BYOK credential. Your API Key still authenticates you into RouterBase; outbound calls to that provider use your upstream credential.
“I want all three.” → Supported. None of them are exclusive.

How they fit together

  • Arrows going in to RouterBase — your API Key or Management API Key. Both live in the Authorization header, different prefixes.
  • Arrows going out of RouterBase — your BYOK credential. Never appears in an Authorization header to RouterBase; stored once, used outbound when RouterBase calls the upstream provider on your behalf.

Strict separation

Middleware rejects the wrong kind on the wrong route with 403:
  • A Management API Key on /v1/chat/completions (or any completion / media route) → 403 “Management keys cannot call completion endpoints”. There is no bypass.
  • An API Key on /api/v1/keys (the CRUD endpoint used by Management keys) → 403.

Using your API Key

Include it as a Bearer token in every request:
Each key is displayed only once at creation time — copy it immediately. Full CRUD: API Keys reference.

Using a Management API Key

Mint one through the logged-in dashboard (JWT-authed root of trust — Management keys cannot mint other Management keys). Then use it server-side to create API keys for your end-users:

Security

  • Never embed any of these keys in frontend code, browser JavaScript, or mobile apps.
  • Never share a Management API Key with end-users — it can mint and revoke keys on your entire account.
  • Never share a BYOK credential — it charges your upstream provider account.
  • Store keys in environment variables or a secrets manager (AWS Secrets Manager, Vault, etc.).
  • Use IP whitelisting to restrict API Keys to your server IPs.
  • Rotate keys regularly. disabled=true pauses; DELETE revokes permanently.