Get your API key
Find your API key in the Invoke dashboard under Settings → API Keys.Passing your API key
SDK
The@invoke/sdk package reads INVOKE_API_KEY automatically from process.env:
Direct API requests
Send your key as theX-API-Key header:
Environment variable
Set your key in your environment or.env file:
Authentication errors
| Error | Cause | Fix |
|---|---|---|
401 Unauthorized | Missing or invalid API key | Check the key is set and correct |
403 Forbidden | Key is valid but lacks permission | Check your account plan and key scope |
apiKey is missing or empty.
Next steps
- Environment Variables — all configuration variables
- Quick Start — end-to-end setup including authentication