---
title: N8n Integration
description: Connect n8n workflow automation to LLM Gateway for AI-powered workflows
image: guides/n8n/overview.png
icon: N8n
---

import { Step, Steps } from "fumadocs-ui/components/steps";
import { Callout } from "fumadocs-ui/components/callout";

n8n is a powerful workflow automation tool that can be enhanced with AI capabilities through LLM Gateway. This guide shows how to integrate LLM Gateway into your n8n workflows.

![n8n workflow with LLM Gateway](/guides/n8n/overview.png)

<Callout type="info">
	**Using DevPass?** This integration also works with a
	[DevPass](https://devpass.llmgateway.io) plan key. Use root model IDs without
	a provider prefix (`claude-sonnet-4-5`, not `anthropic/claude-sonnet-4-5`) —
	provider-pinned routing is not available on coding plans; the gateway picks
	the provider for you.
</Callout>

## Prerequisites

- An LLM Gateway account with an API key
- n8n instance (self-hosted or cloud)
- Basic understanding of n8n workflows

## Setup

The easiest way to use LLM Gateway with n8n is through the OpenAI node with custom configuration.

<Steps>
<Step>
### Add OpenAI Credentials

1. In n8n, go to **Settings** → **Credentials**

![n8n credentials](/guides/n8n/credential-1.png)

2. Click **Add Credential** → **OpenAI**

![n8n credentials](/guides/n8n/credential-2.png)

3. Configure as follows:
   - **API Key**: Your LLM Gateway API key
   - **Base URL**: `https://api.llmgateway.io/v1`
   - **Organization ID**: Leave blank

![n8n credentials](/guides/n8n/credential-3.png)

</Step>
<Step>
### Configure OpenAI Node

1. Add an **AI Agent** node to your workflow
2. Add a **Chat Model** edge to the node

![n8n credentials](/guides/n8n/node-1.png)

3. Configure the node to use the LLMGateway provider

![n8n credentials](/guides/n8n/node-2.png)

<Callout type="warning">
	Note: You have to toggle off the responses API. LLMGateway does not support
	it.
</Callout>

![responses api](/guides/n8n/responses-api.png)

    4. Select your desired options

- **Model**: Use any [LLMGateway model](https://llmgateway.io/models) ID (e.g., `gpt-5`)
- **Options**: Optionally, configure LLM parameters

![n8n credentials](/guides/n8n/model.png)

</Step>

<Step>
### Test Workflow

Finally, try running your workflow with a test prompt.

![n8n credentials](/guides/n8n/test.png)

</Step>
</Steps>
