Generating API Keys
Navigate to the dashboard keys page and generate a key from the UI: fal.ai/dashboard/keysRequired Scope
fal API endpoints require Admin scope API keys. When generating keys in the dashboard, select theADMIN scope.
Admin keys provide:
- Full access to fal API endpoints
- Access to usage and analytics data
- Access to pricing and estimation endpoints
- Access to private models and CLI operations
Admin API keys have elevated permissions and should be kept secure. Never expose them in client-side code.
Authentication Format
Include your Admin API key in theAuthorization header with the Key prefix:
Usage Examples
cURL
Python
JavaScript
Best Practices
- Store API keys in environment variables
- Rotate keys regularly
- Keep Admin API keys secure and never expose them client-side
Troubleshooting
401 Unauthorized
- Verify your Admin API key is correct
- Ensure the Authorizationheader includes theKeyprefix
- Check that your API key hasn’t been revoked