Create an API Key
API requests are authenticated with a GetRouter API key. Create a separate key for each application or tool so you can track usage and revoke access independently.
Create a key
- Sign in to GetRouter.
- Open the API Keys page.
- Select Create API Key.
- Enter a name that identifies the application, such as
Codex,OpenClaw, orDevelopment. - Optionally set an expiration time, usage limit, or model restrictions.
- Create the key and copy it to a secure location.
Example naming scheme:
Authenticate a request
Send the key as a Bearer token:
Do not include quotation marks around the actual key value in a tool's API key field unless the tool explicitly requires them.
Store keys safely
For local development, place the key in an environment variable:
Then reference the variable from your application:
Danger
Never commit API keys to Git, expose them in browser-side code, or paste them into public issue reports. If a key is exposed, delete it immediately and create a replacement.
Use separate keys
Separate keys make it easier to:
- Revoke one tool without interrupting other applications
- Set different usage limits
- Restrict a key to the models it needs
- Identify unexpected usage
