Creating an API Key
Using Your API Key
Include your API key in thex-api-key header:
API Key Format
Endprompt API keys follow a consistent format:Managing API Keys
Viewing Keys
The API Keys page shows:| Column | Description |
|---|---|
| Name | Your descriptive name |
| Created | When the key was created |
| Last Used | Most recent API call |
| Status | Active or Revoked |
For security, you cannot view the full key after creation. Only the last 4 characters are shown.
Revoking Keys
If a key is compromised:- Go to API Keys
- Find the key to revoke
- Click ⋯ → Revoke
- Confirm the action
Rotating Keys
Best practice is to rotate keys periodically:Security Best Practices
Never Expose Keys
Don’t commit keys to git or expose in client-side code
Use Environment Variables
Store keys in env vars, not hardcoded
Rotate Regularly
Create new keys and revoke old ones periodically
Use Separate Keys
Different keys for dev, staging, production
Environment Variables
Store your API key in environment variables:Key Naming Convention
Use descriptive names that identify:- Environment (Production, Staging, Development)
- Application or service name
- Purpose
Production - Main APIStaging - Integration TestsDevelopment - Local TestingCI/CD - GitHub Actions
Authentication Errors
401 Unauthorized
- Missing
x-api-keyheader - Invalid API key
- Revoked API key
- Verify the header name is exactly
x-api-key - Check for typos in the key
- Confirm the key is active in your dashboard
403 Forbidden
- Key doesn’t have access to the endpoint
- Endpoint is internal/private
Rate Limits Per Key
Each API key has its own rate limits:| Limit | Default |
|---|---|
| Per Minute | 60 requests |
| Per Hour | 1,000 requests |
| Per Day | 10,000 requests |

