> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# n8n setup

> Build workflows and agents using a Pearl chat model.

## Before you start

Complete organization setup, make sure your account has inference credit, and create a key on the [API Keys page](https://platform.pearlresearch.ai/api-keys). Most coding agents need a tool-capable chat model; Aider's basic edit workflow does not require native tool calling. Image input and reasoning support depend on the model. These terminal examples use Bash or Zsh on macOS, Linux, or Windows through WSL.

Use your existing n8n instance or install n8n using its official guide. [Installation instructions](https://docs.n8n.io/deploy/host-n8n/install-options/one-line-setup).

## Get your connection settings

Open [Integrations](https://platform.pearlresearch.ai/integrations), select a model, then choose n8n. The screen uses your organization's region. The examples below use the public global endpoint; replace it with your regional endpoint and replace `YOUR_MODEL_ID` with the full model ID shown there. Choose one of the models listed for this integration.

Paste your Pearl API key into n8n's API key field. Enter the key itself, not an environment variable name.

## Configure n8n

Create an OpenAI credential with your Pearl key and replace the Base URL, which defaults to OpenAI. n8n tests the connection when you save. On an OpenAI Chat Model node, choose that credential and pick the Pearl model from the list. Use Responses API is on by default; turn it off. Maximum Number of Tokens is under Options. Leave Reasoning Effort and Response Format unset unless the model and request format support them. Node and menu names can differ between n8n releases.

```text OpenAI credential fields theme={null}
API Key: Paste your Pearl API key
Organization ID: Leave empty
Base URL: https://inference.pearlresearch.ai/v1
```

```text OpenAI Chat Model fields theme={null}
Credential: The OpenAI credential you created
Model: YOUR_MODEL_ID
Use Responses API: Off
Maximum Number of Tokens (under Options): 8192
```

## Start using n8n

Create a workflow with a chat trigger and a Basic LLM Chain, and attach the OpenAI Chat Model to the chain's Model input. Open the workflow chat and send a message. For AI Agent workflows, select a tool-capable model and attach the tools you want the workflow to call.

## Troubleshooting

If the credential test fails, check that the Base URL is the Pearl endpoint, not the OpenAI default. If the model list does not show your model, switch Model to By ID and enter its exact ID. This setup covers chat and workflow tools; it does not configure embeddings, hosted OpenAI tools, image generation, or stored Responses conversations.

* `401`: check the key and allow time for a newly created key to reach the inference gateway.
* `404`: copy the endpoint and exact model ID from Integrations. OpenAI base URLs end in `/v1`; the Anthropic SDK and Claude Code use the URL without that suffix.
* `402`: check your organization's credit and billing status.
* `429` or Anthropic `529`: respect retry instructions and reduce concurrency.
* For truncated output, check the output limit and reasoning budget. Increase limits only within the model's maximum output length.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.