Inferoute authenticates every request using an API key passed as a Bearer token in the Authorization header. You generate API keys in the Inferoute dashboard and can create multiple keys for different environments, teams, or applications.
Generate an API key
- Sign in to your Inferoute dashboard at inferoute.ai.
- Go to Settings → API Keys.
- Click New API key.
- Enter a descriptive name for the key (for example,
production-app or dev-local).
- Optionally set an expiry date to limit how long the key remains valid.
- Click Create and copy the key immediately — it will not be shown again.
Copy your API key before closing the dialog. Inferoute stores only a hashed version of the key and cannot display it again after creation. If you lose a key, revoke it and create a new one.
Pass the API key in requests
Include your API key in the Authorization header of every request using the Bearer scheme.
Use environment variables
Store your API key in an environment variable rather than hardcoding it in your application. The recommended variable name is INFEROUTE_API_KEY.
For long-running applications, set the variable in your deployment environment (for example, in a .env file loaded by your framework, or through your cloud provider’s secrets manager).
Invalid and expired keys
If you provide a missing, malformed, or expired API key, Inferoute returns a 401 Unauthorized response:
Check the following if you receive a 401 error:
- The
Authorization header is present and uses the Bearer prefix.
- The key was copied correctly with no leading or trailing whitespace.
- The key has not expired (check Settings → API Keys in the dashboard).
- The key has not been revoked.
Security best practices
- Use environment variables — never hardcode an API key in source code or configuration files.
- Never commit keys to version control — add
.env and any secrets files to your .gitignore.
- Create separate keys per environment — use distinct keys for development, staging, and production so you can revoke one without affecting the others.
- Set expiry dates — use short-lived keys for CI pipelines and temporary integrations.
- Rotate keys regularly — revoke and replace keys periodically, especially after a team member leaves or a potential exposure.
- Limit key scope — if your use case allows, create keys with restricted permissions rather than full-access keys.
You can create as many API keys as you need. Using one key per application or service makes it easy to audit usage and revoke access for a single integration without disrupting others.
Manage your API keys
You can view, rename, and revoke API keys at any time from Settings → API Keys in the dashboard. For more on setting per-key rate limits and token budgets, see API key configuration.