AI API¶
Model management¶
Get current model¶
Returns the currently active AI model.
Set active model¶
Available models: gemini, claude, qwen, qwen3
Content generation¶
Generate content¶
Generate AI content with optional model override.
Chat (AI Copilot)¶
Multi-turn AI conversation endpoint. See AI Operations Copilot.
Email-specific AI¶
Email intelligence¶
AI analysis of email content providing urgency assessment, action items, and insights.
Email draft generation¶
Generate an email reply draft using the inbox-specific knowledge base for context.
The AI loads the relevant knowledge base files (e.g., general.md + hello.md) and generates a contextual draft with anti-injection prompts.
API key management¶
Manage developer API keys for programmatic access:
| Method | Endpoint | Description |
|---|---|---|
GET | /api/api-keys | List API keys |
POST | /api/api-keys | Create a new API key |
DELETE | /api/api-keys/:keyId | Revoke an API key |
n8n integration endpoints¶
Used by n8n workflows for advanced automation:
| Method | Endpoint | Description |
|---|---|---|
POST | /api/n8n/email-response | Generate AI email response (legacy) |
POST | /api/n8n/digital-audit | Generate AI audit report |
GET | /api/n8n/model-info | Get current model info and availability |
Legacy endpoints
The /api/n8n/email-response endpoint is maintained for backward compatibility. New deployments should use the built-in auto-responder instead.