n8n is a (no-code) automation platform. Claude via Guard connects in two ways: as an Anthropic credential for nodes inside a workflow, and as the model behind n8n's own AI Assistant.
- Create a Credential of type Anthropic API.
- API Key — your
gd-…from the bot. - Base URL —
https://api.guardrelay.ai. - In the workflow add an AI Agent or Anthropic Chat Model node and select this credential.
- Model —
claude-sonnet-5-5orclaude-opus-5.
This is not a node but n8n's own helper: it lives in the editor side panel, reads your workflows and edits them. It is configured with environment variables, not a credential. Requires self-hosted n8n 2.31.0 or newer.
services:
n8n:
image: docker.n8n.io/n8nio/n8n:latest
environment:
- N8N_ENABLED_MODULES=instance-ai
- N8N_INSTANCE_AI_MODEL=anthropic/claude-sonnet-5-5
- N8N_INSTANCE_AI_MODEL_URL=https://api.guardrelay.ai
- N8N_INSTANCE_AI_MODEL_API_KEY=gd-…docker compose pull
docker compose up -dKimi works both with an Anthropic credential (Base URL https://api.guardrelay.ai) and with a node on an OpenAI-compatible API (Base URL https://api.guardrelay.ai/v1). The key is the same gd-…, and the model field takes one of the four Kimi IDs. On the Anthropic address the accepted field list is closed: a stray field in the node settings gives a 400 before billing.
Composer and Grok accept both the Anthropic address https://api.guardrelay.ai and the OpenAI-compatible https://api.guardrelay.ai/v1. Put the exact id in the model field, for example cursor-grok-4.6-medium or composer-2.5.
- Create a Credential with an OpenAI-compatible API.
- API Key — your
gd-…from the bot. - Base URL —
https://api.guardrelay.ai/v1, exactly with/v1. - In the workflow add an AI Agent or OpenAI Chat Model node and select this credential.
- Model — type the id by hand:
k3,k3-256k,kimi-for-codingorkimi-for-coding-highspeed.
Before configuring the node, check the key with one command:
curl -X POST https://api.guardrelay.ai/v1/chat/completions \
-H "Authorization: Bearer $GUARD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "k3", "messages": [{"role": "user", "content": "Hello!"}], "max_tokens": 128}'- Create a Credential of type Anthropic API: both families accept the Anthropic Messages protocol.
- API Key — your
gd-…from the bot. - Base URL —
https://api.guardrelay.ai, without/v1. - Add an AI Agent or Anthropic Chat Model node and select this credential.
- Model — type the exact id:
cursor-grok-4.6-high,cursor-grok-4.6-medium,composer-2.5or their-fastvariant.
curl -X POST https://api.guardrelay.ai/v1/chat/completions \
-H "Authorization: Bearer gd-your-key" \
-H "Content-Type: application/json" \
-d '{"model": "composer-2.5", "messages": [{"role": "user", "content": "Hi!"}], "max_tokens": 128}'This example sends a regular GLM HTTP request through an HTTP Request node. Specialized n8n AI nodes may require different settings.
- Create a credential/header secret for
Authorizationwith valueBearer gd-…. - Method:
POST; URL:https://api.guardrelay.ai/glm/v1/chat/completions. - Add
content-type: application/json. - Choose a JSON body and send an exact model ID,
messages, andmax_tokens: 4096. - Use
choices[0].message.contentin the next node.
{
"model": "glm-5.3",
"messages": [
{"role": "user", "content": "{{$json.prompt}}"}
],
"max_tokens": 4096
}For stateful Responses, use another HTTP Request to /glm/v1/responses: save response.id, then pass it as previous_response_id. store defaults to true; continuation is unavailable after store: false.