---
title: "n8n OpenAI-compatible Base URL with the OpenAI Chat Model"
description: "Point n8n's OpenAI credential at BroadNet Inference with the Base URL field, then use the OpenAI Chat Model node by ID with the Responses API toggle turned off."
url: https://broadrouter.com/guides/n8n-openai-compatible/
lang: en
updated: 2026-11-16
publisher: BroadRouter (a BroadNet site); API by BroadNet Inference, https://inference.broadnet.ai
---

# Use BroadNet Inference in n8n (OpenAI credential, Base URL)

Updated 2026-11-16

In n8n, create an OpenAI credential with your BroadNet key as API Key and Base URL set to https://inference.broadnet.ai/v1. In the OpenAI Chat Model node, switch Model from From List to ID, enter a BroadNet ID such as broadnet/glm-5.3, and turn off Use Responses API so n8n calls chat completions.

n8n is a workflow automation tool. Its **OpenAI** credential has a **Base URL** field, so the **OpenAI Chat Model** node (and the other OpenAI nodes that use the credential) can call any OpenAI-compatible API. BroadNet Inference is one. n8n’s docs page for the credential doesn’t show the Base URL field, so the field names below are checked against n8n’s source code as well, linked in the sources.

## Setup

1.  **Create the credential.** In n8n, go to **Credentials**, create a new **OpenAI** credential, and fill in:
    
    | Field | Value |
    | --- | --- |
    | API Key | your BroadNet key |
    | Organization ID (optional) | leave blank |
    | Base URL | `https://inference.broadnet.ai/v1` |
    
    Save it. n8n tests the credential by calling `/models` on the Base URL.
    
2.  **Add the model node.** Add an **AI Agent** or **Basic LLM Chain** node, then attach an **OpenAI Chat Model** sub-node and select the credential.
    
3.  **Set the model by ID.** In **Model**, switch the mode from **From List** to **ID** and enter `broadnet/glm-5.3`.
    
4.  **Turn off Use Responses API.** In n8n’s source, the toggle exists from node version 1.3 and is on by default there. BroadNet serves chat completions, so turn it off.
    
5.  **Set options.** Under **Options**, leave **Maximum Number of Tokens** at its default (-1) or set it to a few thousand. **Max Retries** defaults to 2; raise it if you want n8n to retry failed calls more often.
    
6.  **Run the workflow** once with a test prompt.
    

n8n shows a notice when you use a non-OpenAI Base URL: not all models might be chat-compatible or support tools calling or JSON response format. For BroadNet, chat works on every chat model, but BroadNet’s docs list tools and structured output only for GLM 5.3 and Qwen3.8 27B.

## Which model to pick

| Workflow | Model | Why |
| --- | --- | --- |
| AI Agent with tools | `broadnet/glm-5.3` | Tools and structured output listed by BroadNet |
| Images, Arabic messages | `broadnet/qwen3.8-27b` | Tools, image input, tested in Arabic |
| High-volume classification | `broadnet/gemma-4-26b-a4b` | Low per-token price; no reasoning listed |
| Long documents | `broadnet/deepseek-v4.1-flash` | 1M context; tools not listed |

Compare prices on the [pricing page](https://broadrouter.com/pricing/). For audio, n8n’s HTTP Request node can post files to `/v1/audio/transcriptions`; the [Arabic speech-to-text guide](https://broadrouter.com/guides/arabic-speech-to-text-api/) shows the form fields to send.

## Troubleshooting

-   **Credential test fails.** Check the Base URL ends in `/v1` with no trailing path. If chat calls also return 401, the key is wrong, expired, or out of pay-as-you-go allowance.
-   **Model errors.** Use the **ID** mode and enter the exact BroadNet ID with the `broadnet/` prefix. GLM 5.3, Qwen3.8 27B and DeepSeek V4.1 Flash need a top-up; the $5 starting credit covers BroadNet Gemma 4 VL 26B.
-   **“Bad request - please check your parameters”.** n8n’s docs suggest repeating the call in an HTTP Request node to see the full error. A common cause here is the Responses API toggle.
-   **Empty output.** Reasoning counts toward **Maximum Number of Tokens**. Raise it. [Why answers come back empty](https://broadrouter.com/guides/reasoning-tokens-empty-response/).
-   **429 in loops.** A pay-as-you-go key allows 30 requests a minute and 4 at once. n8n’s docs suggest **Loop Over Items** with a **Wait** node to pace batches. See [errors and retries](https://broadrouter.com/guides/errors-and-retries/).
-   **Parallel executions on a plan key.** An [unlimited plan session](https://broadrouter.com/guides/unlimited-llm-api-sessions/) runs one request at a time. Parallel workflow executions queue unless each has its own session.

Prefer code? The same settings work in [LangChain](https://broadrouter.com/guides/langchain-openai-base-url/), which n8n’s AI nodes are built on.

## Terms in this guide

[Base URL](https://broadrouter.com/glossary/base-url/)

A base URL is the fixed root address of an API, such as https://api.example.com/v1, that a client puts in front of every endpoint path, such as /chat/completions. In OpenAI-compatible SDKs, changing the base URL, together with the API key and model ID, points the same code at a different provider.

[Tool calling](https://broadrouter.com/glossary/tool-calling/)

Tool calling, also called function calling, is an LLM API feature in which the model returns a structured request to run a function the developer has defined, with JSON arguments. The application runs the function and sends the result back; the model never runs code itself.

[Pay-as-you-go](https://broadrouter.com/glossary/pay-as-you-go/)

Pay-as-you-go is a pricing model in which you pay only for what you use, metered per unit such as tokens, requests or audio minutes, with no subscription or minimum commitment. Most LLM APIs bill this way, from a prepaid balance or a periodic invoice.

[Token](https://broadrouter.com/glossary/token/)

A token is the unit of text a language model reads and writes: a word, part of a word, a punctuation mark or a byte sequence produced by the model's tokenizer. LLM APIs count, limit and usually bill usage in tokens.

[AI agent](https://broadrouter.com/glossary/agent/)

An AI agent is a system in which a language model directs its own steps toward a goal: it decides which tools to call, reads the results and repeats until it produces a final answer or hits a limit. A fixed script that calls a model at set points is usually called a workflow instead.

[Structured output](https://broadrouter.com/glossary/structured-output/)

Structured output is an LLM API feature that constrains a model's reply to a format the developer specifies, usually a JSON Schema, so code can parse it reliably. It is stricter than JSON mode, which guarantees valid JSON but not a particular shape.

[API key](https://broadrouter.com/glossary/api-key/)

An API key is a secret string that identifies and authorizes a client calling an API. LLM APIs usually expect it in an Authorization: Bearer header, and anyone who holds the key can make requests that are billed to the account that owns it.

[Chat Completions API](https://broadrouter.com/glossary/chat-completions-api/)

The Chat Completions API is OpenAI's HTTP endpoint, POST /v1/chat/completions, that takes a model name and a list of role-tagged messages and returns the model's next message. Its request and response shape became the common format that OpenAI-compatible providers and SDKs reuse.

## Questions

### Why does the n8n AI Agent fail with BroadNet?

Check that Use Responses API is off in the OpenAI Chat Model node. In node version 1.3 it is on by default, and BroadNet serves /v1/chat/completions, not the Responses API. Also set Model to ID mode with the exact BroadNet ID.

### Why is the model dropdown empty or wrong?

The From List mode reads the provider's /models endpoint. BroadNet's docs describe that endpoint as public catalog metadata for monitors. Switch Model to ID mode and type the BroadNet model ID.

### Why does the n8n agent return an empty output?

The reasoning used up Maximum Number of Tokens. Raise it, or leave it at the default of -1.

### Where is the Base URL field in n8n's OpenAI credential?

It is in the OpenAI credential itself, below API Key and Organization ID. Its default is https://api.openai.com/v1. Replace it with https://inference.broadnet.ai/v1, keeping /v1 and adding no further path.

## Related guides

-   [Transcribe WhatsApp voice notes in n8n](https://broadrouter.com/guides/n8n-whatsapp-voice-note-transcription/)
-   [Use LangChain with BroadNet Inference](https://broadrouter.com/guides/langchain-openai-base-url/)
-   [Arabic speech-to-text API, step by step](https://broadrouter.com/guides/arabic-speech-to-text-api/)
-   [Why a reasoning model returns an empty answer](https://broadrouter.com/guides/reasoning-tokens-empty-response/)
-   [BroadNet Inference error codes and when to retry](https://broadrouter.com/guides/errors-and-retries/)
-   [All tools that work with BroadNet Inference](https://broadrouter.com/integrations/): SDKs, coding agents, chat UIs and automation tools, with exact settings for each

Try it on your real workload. New accounts start with $5 of credit for Gemma and transcription. DeepSeek, GLM and Qwen3.8 need a top-up.

[Get started](https://inference.broadnet.ai/account/?utm_source=broadrouter&utm_medium=referral&utm_campaign=guides-n8n-openai-compatible&utm_content=page-cta) ·

**Sources**

-   [n8n docs, OpenAI Chat Model node (checked 2026-11-14)](https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatopenai/)
-   [n8n docs, OpenAI Chat Model common issues (checked 2026-11-14)](https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatopenai/common-issues/)
-   [n8n docs, OpenAI credentials (checked 2026-11-14)](https://docs.n8n.io/integrations/builtin/credentials/openai/)
-   [n8n source, OpenAI credential fields (checked 2026-11-14)](https://github.com/n8n-io/n8n/blob/master/packages/nodes-base/credentials/OpenAiApi.credentials.ts)
-   [n8n source, OpenAI Chat Model node (checked 2026-11-14)](https://github.com/n8n-io/n8n/blob/master/packages/@n8n/nodes-langchain/nodes/llms/LMChatOpenAi/LmChatOpenAi.node.ts)
-   [BroadNet Inference API reference](https://inference.broadnet.ai/docs?utm_source=broadrouter&utm_medium=referral&utm_campaign=guides-n8n-openai-compatible&utm_content=sources)
