Create and manage API keys
Create keys, choose lines, restrict request sources, and rotate credentials.
Create and save a key
Open API keys, confirm the personal or team context, and create a key. Choose a name that identifies its service or environment and select the line that service requires.
Save the complete key when it is created. The console subsequently displays a mask. If you lose the plaintext value, create a replacement, verify the application, and disable the old key.
An API Key field takes only the credential. Use Authorization: Bearer <your-irouter-api-key> in an HTTP header. Your account password is not an API key.
Lines and source restrictions
A line determines the resources and prices used for a request. Review models and lines before switching. An enabled key does not grant access to every model.
IP allowlists accept individual addresses and CIDR ranges. Use the application's public outbound address; a local private address is usually not what the gateway sees. Allowlist changes require security verification. Requests may also need to satisfy a team-level allowlist.
Disable and rotate
- Create a replacement for the service with its required line and restrictions.
- Replace the credential in server-side secret configuration, deploy, and send a test request.
- Confirm the usage attribution, disable the old key, and delete it once no longer needed.
If exposure is suspected, disable the affected key immediately and inspect unusual usage. For an administrator suspension, follow the reason shown in the console and contact the administrator. The owner cannot directly clear that suspension.
Verify
Follow model discovery and the curl guide using the new key. Keep credentials in server-side environment variables or a secret manager, not webpages, mobile application packages, repositories, or support reports.