# Connect Flowise's OpenAI Custom Model node to Router One

> Markdown mirror of https://router.one/integrations/flowise for AI assistants and crawlers. Router One is an OpenAI-compatible LLM API gateway.
> Last updated: 2026-09-19

Flowise is an open-source, low-code builder for LLM apps: you wire nodes on a canvas into Chatflows, Agentflow V2 flows and Assistants, and each of them needs a chat-model node. Its OpenAI nodes wrap LangChain JS's ChatOpenAI class, which runs on the official openai Node SDK, so the OpenAI Custom Model node, which has a free-text Model Name and a Base Path field, sends Chat Completions requests to any OpenAI-compatible endpoint. Point it at Router One and one credential gives a flow any chat model in the catalog (GPT, Claude, Gemini, Grok and DeepSeek families), with a cost trace per request in Dashboard → Logs. This guide covers which of Flowise's two OpenAI nodes to use and why, the exact field values, where the node plugs in across Chatflow, Agentflow V2 and Assistants, and why the Embeddings node behind a Document Store stays on another provider. Field labels were checked against Flowise 3.1.4; 3.0.x and the official docs still call the two nodes ChatOpenAI Custom and ChatOpenAI, with BasePath and BaseOptions written as one word.

## Install Flowise and create a dedicated key

Flowise runs from npm or Docker. The README's quick start is npm install -g flowise, then npx flowise start, and the app opens at http://localhost:3000. For Node.js the README asks for 20.0.0 or later, while the published flowise 3.1.4 package declares node ^24 in its engines field and the official Dockerfile builds on Node 24, so Node 24 satisfies both. For Docker, the README's route is the docker folder of the repository: copy .env.example to .env and run docker compose up -d; the compose file pulls the flowiseai/flowise image and publishes PORT, which .env.example sets to 3000. In Router One, create a key for this Flowise instance in Dashboard → API Keys and give it a maxSpend cap; the next step stores it as a Flowise credential.

`terminal`

```bash
# Node.js: the README asks for >= 20.0.0; flowise 3.1.4 declares engines node ^24
npm install -g flowise
npx flowise start
# then open http://localhost:3000

# Or Docker Compose, from the docker folder of the Flowise repository
cp .env.example .env
docker compose up -d
```

## Store the key as an OpenAI API credential

Open Credentials in the left menu, click Add Credential, pick OpenAI API, give it a Credential Name such as router-one, and paste the Router One key into OpenAI Api Key. The same dialog opens from a node through Connect Credential → Create New. Flowise stores third-party keys as encrypted credentials: by default it generates a random encryption key at first start and saves it under SECRETKEY_PATH. If that key is regenerated or the path changes, for example when a container is rebuilt without its volume, the official docs warn that saved credentials fail with Credentials could not be decrypted. Setting FLOWISE_SECRETKEY_OVERWRITE pins the encryption key so the credential survives restarts; the official compose file also mounts ~/.flowise into the container. Flowise keeps as many OpenAI API credentials as you add, so a second Router One key for another flow is just another credential. Flowise's own API Keys page is unrelated: those keys protect Flowise's endpoints, not the model calls.

`docker/.env`

```bash
PORT=3000
# Pin the key that encrypts stored credentials, so a rebuilt container can still decrypt them
FLOWISE_SECRETKEY_OVERWRITE=<a-long-random-string-you-keep>
# SECRETKEY_PATH=/your_secret_path/.flowise
```

## Configure Flowise to use the Router One base URL

On the canvas, click Add Nodes, open Chat Models and drag OpenAI Custom Model (ChatOpenAI Custom before 3.1). Use this node rather than the stock OpenAI node: the stock node's Model Name is a closed dropdown loaded from Flowise's models.json, which lists bare OpenAI names with gpt-4o-mini as the default, whereas the Custom node's Model Name is a free-text box, and that is what an exact catalog ID such as anthropic/claude-sonnet-5 needs, prefix included. Connect Credential takes the OpenAI API credential from the previous step. Temperature defaults to 0.9 and is sent with every request. Click Additional Parameters for the rest. Streaming is on by default. Max Tokens and Timeout are optional; Timeout is handed to the openai SDK in milliseconds, and the SDK's own default is 10 minutes. Base Path takes https://api.router.one/v1 with /v1: the node passes it to LangChain as configuration.baseURL, and the openai SDK appends /chat/completions to it, so every call is POST /v1/chat/completions. Leave Base Options empty; it is a JSON object of extra default headers, and the key already travels in the Authorization header. Connect the node to a chain or agent, save the flow, and send one message from the chat panel:

`flowise-openai-custom-model`

```text
# Flowise 3.1.x canvas → Add Nodes → Chat Models → OpenAI Custom Model
# (3.0.x and the official docs: ChatOpenAI Custom, with BasePath / BaseOptions)
Connect Credential:  OpenAI API credential holding sk-your-router-one-key
Model Name:          <exact-model-id-from-/models>
Temperature:         0.9
# Additional Parameters
Streaming:           on
Max Tokens:          (optional)
Timeout:             (optional, milliseconds)
Base Path:           https://api.router.one/v1
Base Options:        (leave empty)
```

## Where the node plugs in, and what each surface sends

Everything in Flowise that needs a language model takes a Chat Models node, so the same OpenAI Custom Model configuration works in every builder. Rows five to eight mark the cases that fail, or that never reach the gateway's Chat Completions endpoint:

| Flowise surface | What it sends | What to verify |
| --- | --- | --- |
| Chatflow: OpenAI Custom Model → LLM Chain, Conversation Chain | POST https://api.router.one/v1/chat/completions, one request per message | Any chat model in the catalog; one row per message in Dashboard → Logs |
| Chatflow: Tool Agent → Tool Calling Chat Model | One Chat Completions request with tools per iteration; Max Iterations is empty by default, which means 15 | The model's detail page lists tool calling; lower Max Iterations under Additional Parameters |
| Agentflow V2: Agent, LLM and Condition Agent nodes → Model | The Model dropdown lists every Chat Models node, OpenAI Custom Model included, and opens its fields inline; one request per step or tool round | The Agent node has no Max Iterations field, so the key's maxSpend is the hard stop |
| Assistants → Custom Assistant | Picks a Chat Models node, so the same Chat Completions requests | The OpenAI Assistant type calls OpenAI's Assistants API, which Router One does not serve; Flowise marks that type as being deprecated |
| Stock OpenAI node with Base Path | The same path, but Model Name only offers the names in models.json, default gpt-4o-mini | Those names are not catalog IDs; use the Custom node, or serve your own models.json through MODEL_LIST_CONFIG_JSON |
| Stock OpenAI node: Reasoning Summary; Agent node: OpenAI Built-in Tools | LangChain moves the call to POST /v1/responses | Router One serves /v1/responses only for the currently listed GPT-family and DeepSeek IDs; the Custom node shows neither option |
| Document Stores and vector-store upsert → Embeddings node | An embeddings request to that node's own provider or Base Path | Router One has no /v1/embeddings: keep OpenAI Embedding on another provider, or run Ollama Embedding locally |
| Prediction API: POST /api/v1/prediction/:id | Flowise's own endpoint on port 3000, protected by a Flowise API key | Not a gateway path: the /v1 in it belongs to Flowise, and the sk- key never goes there |

## Budget one Flowise instance and reconcile its model calls

One message into a flow is rarely one model request. A Tool Agent calls the model once per iteration until it stops asking for tools, up to Max Iterations (15 when the field is empty). An Agentflow V2 Agent node keeps calling the model for as long as it returns tool calls and has no iteration field. LLM and Condition Agent nodes add a request each, and a loop in the flow multiplies all of it. LangChain also retries failed calls, up to 6 times by default, and every attempt that reaches the gateway is its own request with its own trace and charge; it does not retry 400, 401, 402, 403 or 404, so a key that reaches its maxSpend cap stops the flow on the first 402 instead of looping. Give each Flowise instance its own Router One key with maxSpend, or go one step finer: credentials are chosen per node, so a public-facing flow can use a separate OpenAI API credential that holds a separate key and cap. Dashboard → Logs is the billing record, one row per request with request_id, model, tokens, cost, latency and status. Match rows to a run by time and model; Agentflow runs are also listed on Flowise's Executions page, which helps line the two up. A streamed request that Flowise disconnects midway is recorded as HTTP 499 client_cancelled. Router One sees only the model calls: tools, memory, vector stores and the flow's branching all run inside Flowise.

## Which model ID should Flowise send?

Copy the exact model ID from /models, preserving case, hyphens, and version suffixes; do not substitute a display name. Open its detail page and match the supported API endpoints, context window, and capabilities such as tool calling to the provider and features selected in Flowise. A catalog listing does not mean the client can use every feature of that model. Give each tool a dedicated API key with a maxSpend cap.

## Which API protocol is Flowise using?

OpenAI-compatible describes an interface format; it does not make Chat Completions (/v1/chat/completions), Responses (/v1/responses), and Anthropic Messages (/v1/messages) interchangeable. Check the installed client version, provider configuration, and actual request path against the model detail page and API compatibility fact sheet. A successful plain-text chat does not establish support for hosted tools, conversation state, or file-editing features.

## Verify the Flowise call in your request trace

Send a simple text request from Flowise, then match its trace in Dashboard → Logs by time, model, and request_id: tokens, cost, latency, and status. Next, test streaming, tool calls, and multi-turn history separately. For failures, retain the actual request path, full error message, and request_id. If there is no matching log, check client configuration and connectivity before attributing the error to the gateway or upstream.

## FAQ

### The first run fails with a 404 and a MODEL_NOT_FOUND troubleshooting link. Is the model missing?

Not necessarily. LangChain tags every HTTP 404 as MODEL_NOT_FOUND and appends Troubleshooting URL: https://docs.langchain.com/oss/javascript/langchain/errors/MODEL_NOT_FOUND/ to the message, whatever the cause. Read the text before that link: it is the openai SDK's error, the status code followed by the gateway's own message. With Base Path set to https://api.router.one, the SDK posts to /chat/completions and the gateway answers 404 not_found with a message saying the base URL must end in /v1; a doubled /v1/v1 is answered the same way. If the path is right, a 404 points at the model ID: a name picked in the stock OpenAI node's dropdown, such as gpt-4o-mini, is not a catalog ID, so switch to OpenAI Custom Model and paste the exact ID from /models. A 401 is tagged MODEL_AUTHENTICATION in the same manner; AUTH_INVALID_API_KEY in the message means the credential does not hold a valid Router One key. And if Base Path is empty, the SDK falls back to https://api.openai.com/v1, the Router One key is rejected there, and nothing appears in Dashboard → Logs.

### Chat works, but upserting a Document Store fails. Can the Embeddings node use Router One too?

No. Document Stores and vector-store nodes call a separate Embeddings node (the Select Embeddings step of a Document Store), and Router One has no /v1/embeddings endpoint. OpenAI Embedding and OpenAI Custom Embedding each have a Base Path field of their own; do not point it at Router One. Keep embeddings on a provider that offers them, or run them locally with Ollama Embedding. The Flowise docs add a constraint worth planning for: the embedding model and the vector-store index must have the same number of dimensions, so changing the embedding model later means upserting again. Retrieval then happens inside Flowise, and only the final prompt with the retrieved chunks reaches Router One as a Chat Completions request.

### When does Flowise use the Responses API instead of Chat Completions?

Flowise 3.1.4 pins @langchain/openai 1.2.5, whose ChatOpenAI class moves a call to POST /v1/responses by itself in a few cases: a Reasoning Summary chosen on the stock OpenAI node, OpenAI Built-in Tools (Web Search, Code Interpreter, Image Generation) ticked on an Agentflow V2 Agent node, or a model name that contains codex or gpt-5.2-pro. OpenAI Custom Model has no reasoning options, and the Agent node only shows OpenAI Built-in Tools when its model is the stock OpenAI node, so the setup in this guide stays on Chat Completions. Router One serves /v1/responses only for the currently listed GPT-family and DeepSeek IDs, and a model sent to the wrong endpoint gets a 400 whose message says must be called via. If you do need the stock node, for instance for its Allow Image Uploads switch, which the Custom node lacks, its dropdown can be fed from your own copy of models.json through the MODEL_LIST_CONFIG_JSON variable: add the catalog IDs under chat → chatOpenAI → models and keep the rest of the file, because every other node's dropdown reads the same file.

### Which models can Flowise use through the gateway?

Choose a current catalog model that supports both the endpoint and the features Flowise uses. Check /models and the model detail page for the exact ID, current rates, and capabilities; a family name such as GPT or Claude is not a compatibility guarantee. Seeing a model in the picker confirms discovery, so verify an actual request too.

### Models are listed, but requests fail with 400 or 404. What should I check?

Record the actual request path and error message, then check the exact model ID. A 400 can indicate invalid parameters, unsupported tools, or a model/endpoint mismatch; a 404 can indicate an incorrect path or missing resource, so it does not by itself establish that a model was retired. If the error says must be called via, use the named endpoint or select a model supported on the current endpoint. Do not add or remove /v1 or /chat/completions across all clients indiscriminately.

### Does this work from Mainland China?

Yes. The gateway is reachable from Mainland China without a VPN, and the configuration is identical to the global setup.

### How do I debug a 401/402/403/429?

Match the request and error message in Dashboard → Logs. For 401, check whether the key was sent and is valid; for 402, check wallet balance and maxSpend; for 403, check key permissions and access restrictions. For 429, distinguish request/token limits from upstream throttling using the error details. Keep the request_id and follow the error-codes reference.

## See also

- All integration guides: https://router.one/integrations
- Debug API errors in Flowise: https://router.one/llm-api-error-codes
- API compatibility: endpoints and supported features: https://router.one/facts/api-compatibility.md
- Responses API setup and limits: https://router.one/codex-responses-api
- Langflow setup: https://router.one/integrations/langflow
- RAGFlow setup: https://router.one/integrations/ragflow
- LangChain setup (the library under Flowise's nodes): https://router.one/integrations/langchain
- Dify setup: https://router.one/integrations/dify
- Tool calling for agent flows: https://router.one/llm-tool-calling
- Flowise docs: ChatOpenAI, custom base URL and Custom Model: https://docs.flowiseai.com/integrations/langchain/chat-models/azure-chatopenai
- Flowise docs: Agentflow V2: https://docs.flowiseai.com/using-flowise/agentflowv2
- Flowise source: ChatOpenAICustom.ts: https://github.com/FlowiseAI/Flowise/blob/main/packages/components/nodes/chatmodels/ChatOpenAICustom/ChatOpenAICustom.ts
- What the gateway layer does: https://router.one/llm-api-gateway
- OpenAI-compatible API: https://router.one/openai-compatible-api
- API docs: https://router.one/docs
- Canonical page: https://router.one/integrations/flowise
- Models and per-model token rates: https://router.one/models (markdown: https://router.one/models.md)
- Pricing: https://router.one/pricing
- API docs (markdown): https://router.one/docs.md
- Company facts: https://router.one/facts/company.md
