An n8n community node for the DeepKeep AI Firewall API.
Use it in your workflows to check LLM inputs and outputs against DeepKeep guardrails and make arbitrary authorized calls to any DeepKeep API endpoint.
In your n8n instance, go to Settings → Community Nodes → Install, paste n8n-nodes-deepkeep, and click Install.
From your n8n root directory:
npm install n8n-nodes-deepkeepMake sure N8N_COMMUNITY_PACKAGES_ENABLED=true (default in recent versions), then restart n8n.
Create a DeepKeep API credential with:
| Field | Value |
|---|---|
| Base URL | The base URL of your DeepKeep instance, without a trailing slash. Required for node version 2. |
| Subdomain | Legacy field for existing node version 1 workflows. The legacy base URL is https://api.<subdomain>.deepkeep.ai. |
| API Key | Your DeepKeep API key. Sent as the X-API-Key header on every request. |
The credential is tested against GET /health.
New workflows use node version 2 by default. Existing workflows saved with node version 1 continue to use the legacy conversation API.
Version 2 operations live under the Moderation resource.
Checks model input against the guardrails defined on a DeepKeep firewall.
- Model — DeepKeep firewall ID. Sent as the OpenAI-compatible
modelfield. - Input — the text to check.
- Title — optional request title.
- Chat — optional chat identifier or context.
Calls POST /api/v3/openai/moderations/pre with:
{"model":"input-firewall-id","input":"hello","title":"","chat":""}Checks model output against the guardrails defined on a DeepKeep firewall.
- Model — DeepKeep firewall ID. Sent as the OpenAI-compatible
modelfield. - Output — the text to check.
- Title — optional request title.
- Chat — optional chat identifier or context.
Calls POST /api/v3/openai/moderations/post with:
{"model":"output-firewall-id","output":"hello","title":"","chat":""}An escape hatch that lets you call any DeepKeep endpoint with the configured credentials.
- URL — path relative to the configured Base URL (e.g.
/api/v3/openai/moderations/pre). - Method —
GET,POST,PUT,PATCH,DELETE. - Headers — optional key/value rows.
Content-Type: application/jsonis included by default. - Query Parameters — optional key/value rows.
- Body — raw request body (usually JSON).
Returns { statusCode, headers, body }. body is parsed as JSON when possible, otherwise passed through as a string. Non-2xx responses are returned in the envelope rather than thrown.
Version 1 is retained for backwards compatibility with existing workflows. It uses the legacy Firewall Conversation resource and the legacy subdomain credential field.
Checks a prompt against the guardrails defined on a firewall.
- Firewall — select from the list of firewalls in your DeepKeep workspace.
- Conversation ID — existing conversation to append the check to.
- Content — the text to check.
- Return Full Response (Enable Logs) — whether to return all detected violations.
Calls POST /api/v2/firewalls/{firewallId}/conversation/{conversationId}/check_user_input.
Starts a new conversation on a firewall.
Calls POST /api/v2/firewalls/{firewallId}/conversation.
Calls a path relative to the legacy API base https://api.<subdomain>.deepkeep.ai/api.
Version 0.2.7 introduces light node versioning so existing workflows remain backwards compatible while new workflows use the same OpenAI-compatible DeepKeep API calls used by the LangChain integration.
- Existing workflows saved with node version 1 continue to use the legacy conversation API.
- New workflows use node version 2 by default.
- Use Base URL for node version 2.
- Use your DeepKeep firewall ID in the version 2 Model field.
- Version 1 is retained for compatibility only and should not be used for new workflows.
See the sibling n8n-deepkeep/ folder in the source repository for a Docker Compose setup that runs n8n locally with this package mounted as a custom node.
- DeepKeep documentation: https://deepkeep.ai
- Issues: please file on this repository
- Contact: contact@deepkeep.ai