Guides
n8n
Use your stack as the language model behind any n8n AI node, through the n8n-nodes-stac community package.
n8n-nodes-stac is a community
node package that adds a Stac Chat Model sub-node to n8n. It plugs into the
Model input of any AI root node — AI Agent, Basic LLM Chain, Question and
Answer Chain — so a workflow runs on your stack instead of a per-token
provider.
The node talks to the same OpenAI-compatible surface as everything else here, so nothing about your stack changes: same key, same base URL, same fixed monthly price no matter how often the workflow fires.
Install the node
Open Settings → Community nodes
You need to be the instance owner. See n8n's installation guide if the section isn't there.
Install n8n-nodes-stac
Click Install a community node, enter the package name, accept the risks prompt, and install. n8n restarts the node registry on its own — no container restart needed.
Or install it manually
On a self-hosted instance you can skip the GUI and install into n8n's custom nodes directory:
bashcd ~/.n8n/nodes npm install n8n-nodes-stacRestart n8n afterwards.
Create the credential
The package ships one credential type, Stac API, shared by every node in it.
| Field | Value |
|---|---|
| API Key | A key from your stack's API keys page. Stored encrypted by n8n and never shown again after saving |
| Base URL | https://api.trystac.com/v1 — leave it unless you were given a dedicated endpoint |
Authentication is a bearer token (Authorization: Bearer <key>), the same as
every other Stac client. The credential's Test button calls
GET /v1/models, so a green test confirms the
key and the base URL in one shot.
Keys are scoped to a single stack. Use a separate key for n8n rather than reusing your application's — that way revoking it doesn't take your product down with it. See Authentication.
Add it to a workflow
Add an AI root node
An AI Agent is the usual starting point, but any node with a
Modelinput works.Connect Stac Chat Model to its Model input
Search for "Stac" in the node panel — it's listed under Language Models → Chat Models.
Pick the model
The Model dropdown is populated at edit time from
GET /v1/models, so it lists exactly what your key can call — for most plans that's a single entry, the model your stack runs.
Parameters
Everything except Model lives under Options and is optional.
| Parameter | Default | Notes |
|---|---|---|
| Model | — | Required. Loaded from your plan; can also be set with an expression |
| Sampling Temperature | 0.7 | 0–2. Lower is more deterministic |
| Maximum Number of Tokens | 2048 | Upper bound on generated tokens. The API clamps to its own floor and ceiling — see Chat completions |
| Timeout | 120000 | Milliseconds. Under saturation Stac degrades speed rather than failing, so a tight timeout cuts off responses that would have arrived |
| Max Retries | 2 | Retries per failed request |
How it plugs into n8n
The node builds the model through supplyModel from @n8n/ai-node-sdk, which
n8n provides at runtime. Two consequences worth knowing:
- No bundled LangChain.
n8n-workflowand@n8n/ai-node-sdkare peer dependencies, so the process keeps a single@langchain/coreinstance instead of two fighting over it. - Executions are traced by n8n itself. Model calls show up in n8n's own logging and tracing view, with prompts and token counts, not just as an opaque HTTP call.
Developed and tested against n8n 2.36.9. Older releases ship earlier versions of that SDK and are untested.
Troubleshooting
- Model dropdown is empty. The credential can't reach
GET {baseUrl}/models— wrong key, wrong base URL, or the instance has no outbound network access. Run the credential test to see which. 401 invalid_api_key. The key was revoked or belongs to a deleted stack. Generate a new one; see Errors.429on a busy workflow. Rate limits are per key. Give n8n its own key so a retry storm in a workflow doesn't throttle your application.- Node doesn't appear after installing. Check that
N8N_COMMUNITY_PACKAGES_ENABLEDisn't set tofalse, then reload the editor.
Resources
Next steps
- OpenAI compatibility — the surface the node speaks, and what differs from OpenAI.
- Authentication — key format, scoping, rotation.
- Knowledge base — ground workflow answers in your own documents, with no retrieval nodes in the canvas.

