API Keys
Overview
API Keys enable external applications and services to securely access your PromptForward prompts programmatically. Each API key can be configured with granular permissions to control which prompts and LLM providers it can access.

Creating an API Key
- Navigate to API Keys in the sidebar
- Click + New API Key
- Enter a descriptive name
- Click Create
- Copy the generated API key
Managing Permissions
- Click on an API key to open its detail page
- Click Add Permission
- Toggle Allow All Prompts or select a specific prompt
- Toggle Allow All Providers or select a specific provider
- Click Add Permission
Using API Keys
Include your API key in the Authorization header:
curl -X POST https://api.promptforward.dev/api/inference \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt_id": "your_prompt_id",
"provider_id": "your_provider_id",
"model": "gpt-4",
"variables": {
"user_query": "How do I reset my password?"
}
}'Best Practices
- Use descriptive names - Indicate the key's purpose clearly
- Apply least privilege - Only grant necessary permissions
- Rotate keys regularly - Update keys periodically for security
- Never share keys - Each application should have its own key
- Store securely - Use environment variables, never hardcode
- Use the status toggle - Disable keys temporarily instead of deleting
Security
Keep API keys private and never expose them in:
- Client-side code
- Public repositories
- Log files or error messages
- Documentation or screenshots