Skip to content

Create an API Key

An API key is your credential for calling RouterBus. Every CLI tool and SDK authenticates with it.

Steps

  1. Sign in and open the API Keys page (/keys)
  2. Create a new key
  3. Give it a name so you can tell your keys apart later
  4. Set the options you need:
OptionWhat it does
GroupDefaults to automatic group selection; can be pinned to one group
Model limitsRestrict which models this key may call; empty means no restriction
QuotaThe most this key may spend; can be unlimited
ExpiryThe key stops working after this time
IP restrictionOnly the listed IPs may use the key
  1. Submit

Getting the key

After creating it, use Copy Key on the row. You can copy it again at any time, so there is nothing to lose if you did not save it at creation.

Keys look like this:

sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Treat it like a password

Anyone holding that string can spend your balance. Keep it out of commits, chat groups and support tickets. If it leaks, delete the key on the API Keys page immediately and create a new one.

Using it

Send it in the request header:

Authorization: Bearer sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Or set it as an environment variable for your CLI tool — see Configure CLI.

Other actions on the list

  • Copy Connection Info — address and key together, ready to paste into a client
  • CC Switch — import the key straight into CC-Switch
  • Chat — open the built-in chat interface with this key
  • Enable / Disable — suspend a key without deleting it
  • Delete — takes effect immediately and cannot be undone

A suggestion

Create one key per purpose (one for Claude Code, one for a script). Usage logs then break down by key, and disabling one purpose leaves the others running.

RouterBus API Documentation