TokenHub uses API keys to authenticate every request you make to the platform. You can create multiple keys to isolate access by environment or team, set expiration dates, and revoke any key instantly from the dashboard.Documentation Index
Fetch the complete documentation index at: https://docs.inferoute.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
Creating an API key
Navigate to Settings → API Keys in the TokenHub dashboard and follow these steps:Name your key
Enter a descriptive name that identifies the key’s purpose, such as
production, dev, or staging-team-a.Set an expiration date (optional)
Choose an expiration date if you want the key to automatically expire. Leave blank for a key that does not expire.
Restrict to specific models or providers (optional)
Under Model Restrictions, select the models or providers this key is allowed to call. Leave unrestricted to allow all models.
Managing existing keys
From Settings → API Keys you can:- List all keys associated with your account, along with their name, creation date, expiration, and last-used timestamp.
- Rotate a key by creating a new key with the same restrictions, updating your application to use the new key, then revoking the old one.
- Revoke any key by clicking Revoke next to it. Revocation takes effect immediately — any subsequent request using that key returns
401 Unauthorized.
Best practices
- One key per environment. Use separate keys for development, staging, and production so that a leaked dev key cannot affect production traffic.
- Store keys in environment variables. Set the key as
TOKENHUB_API_KEYin your environment rather than hardcoding it in source code.
- Rotate keys regularly. Establish a rotation schedule (for example, every 90 days) to limit the blast radius of any undetected exposure.
- Set expiration dates on keys used for short-lived purposes such as CI pipelines or one-off scripts.
Revoking a key
To revoke a key, go to Settings → API Keys, find the key you want to remove, and click Revoke. The key is invalidated instantly. Any application still using the revoked key will receive a401 Unauthorized response on its next request.