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
Authorizationheader, different prefixes. - Arrows going out of RouterBase — your BYOK credential. Never appears in an
Authorizationheader 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 with403:
- 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: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
- 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=truepauses;DELETErevokes permanently.