Overview
Pwnbook’s AI features — the in-app chat assistant, PR threat model analysis, and AI-assisted report writing — require at least one AI provider to be configured with a valid API key. AI providers are configured by server admins in the admin panel. Pwnbook supports:- Anthropic (Claude models) — recommended for security-focused tasks
- OpenAI (GPT models)
Adding an Anthropic API key
- Obtain an API key from console.anthropic.com.
- Go to Server Admin → AI Providers.
- Click Add Provider → Anthropic.
- Paste your API key in the API Key field.
- Select the default model to use (e.g.,
claude-opus-4-5,claude-sonnet-4-5). - Click Save.
Adding an OpenAI API key
- Obtain an API key from platform.openai.com.
- Go to Server Admin → AI Providers.
- Click Add Provider → OpenAI.
- Paste your API key in the API Key field.
- Select the default model (e.g.,
gpt-4o,gpt-4-turbo). - Click Save.
Setting the default provider
If you have multiple providers configured, designate one as the default:- Go to Server Admin → AI Providers.
- Click Set as Default next to the provider you want to use by default.
Enabling and disabling AI features
Individual AI features can be enabled or disabled independently:| Feature | Description |
|---|---|
| AI Chat (authenticated) | In-app chat assistant for logged-in users |
| AI Chat (public) | Public-facing AI chat that doesn’t require a Pwnbook account |
| PR threat model analysis | Automatic threat analysis on GitHub pull requests |
| AI report assistance | AI-powered suggestions in the report editor |
- Go to Server Admin → AI Providers → Feature Settings.
- Toggle the features you want to enable or disable.
- Click Save.
Monitoring AI usage
The AI Providers admin page shows basic usage metrics:- Total API calls made per provider
- Token consumption (input and output tokens)
- Cost estimate (based on provider pricing)
- Errors and failed calls
Usage data is aggregated at the platform level. Pwnbook does not store individual conversation content — only metadata (call counts, token usage, timestamps).
Rotating API keys
To rotate an AI provider’s API key:- Generate a new API key in the provider’s console (Anthropic or OpenAI).
- Go to Server Admin → AI Providers.
- Click Edit on the provider.
- Replace the existing API key with the new one.
- Click Save.