Skip to main content
To connect n8n to BetterToken, prepare an API key, enter the Base URL shown below, and choose a current Model ID from the model plaza.

Key settings

Prerequisites

Additional requirements

  • An n8n Cloud or self-hosted instance
Keep /v1 at the end of the Base URL. Do not add /chat/completions or /responses; n8n appends the route required by the node.

Install

Install or open n8n, then continue with the manual setup below.

Manual setup

Complete this setup in the n8n node configuration UI. You do not need to edit an n8n configuration file.

Setup

1

Add AI Agent and OpenAI Chat Model

Open a workflow and add an AI Agent node. At its Chat Model connector, add the OpenAI Chat Model sub-node.This guide uses OpenAI Chat Model because it supplies the model connection for n8n AI Agents, chains, and other AI workflows.
2

Create an OpenAI credential

In OpenAI Chat Model, open Credential to connect with, select Create new credential, and choose OpenAI.If your n8n version offers both OpenAI Account (ChatGPT) and API Key, choose API Key. OpenAI Account authentication is for an official account, not a BetterToken custom Base URL.
3

Enter the BetterToken credential

Use these values:Click Save. n8n tests this credential against /models under the configured Base URL, so the complete test URL is https://bettertoken.ai/v1/models.
4

Select a model

Return to OpenAI Chat Model, open Model, and select the model ID from a supported provider shown in the model plaza.If the list does not update after you save the credential, reopen the node or credential and load the model list again.
5

Choose Chat Completions or Responses

For the first test, keep Use Responses API off and complete a plain conversation through the default Chat Completions mode.Turn on Use Responses API only when your workflow needs it. n8n documents built-in tools such as Web Search, File Search, and Code Interpreter for OpenAI Chat Model + AI Agent with Responses enabled. Those OpenAI-hosted tools are not automatically capabilities confirmed for BetterToken, so test them against the selected model and endpoint.
6

Run a test

Give the AI Agent a simple input:
Click Execute step or run the workflow. The setup is complete when the node returns a model response.

Verify the connection

Send a short test prompt. If the tool returns a response without an authentication or Model ID error, the connection works. Fully restart the tool after changing its configuration.

Switch models

Open the model selector or change the Model field in the configuration. Use the exact Model ID from the model plaza, then restart the current session.

Common errors

Credential test returns 401

  • Make sure the API Key is complete and has no extra spaces
  • Confirm that the key uses a Model ID from the supported provider
  • Check the key status and balance in the BetterToken Dashboard

Credential test returns 404

  • The Base URL must be https://bettertoken.ai/v1
  • Do not use https://bettertoken.ai/v1/models as the Base URL
  • Do not append /chat/completions or /responses

The Model list is empty

  • Save the credential again, then reopen Model
  • Confirm that the API Key can access https://bettertoken.ai/v1/models
  • Copy a current model ID from the model plaza; do not use a retired or misspelled ID

Plain chat works, but Agent tool calls fail

Turn off Use Responses API and all built-in tools, then verify plain Chat Completions. Enable Agent tools one at a time to identify whether the problem is the model capability, tool arguments, or workflow configuration.

The request times out

Increase Timeout under OpenAI Chat Model > Options and keep a limited Max Retries value. Do not repeatedly retry 400, 401, or configuration errors.

Advanced setup

Supported providers

Statuses apply to the BetterToken setup documented on this page.
  • Manual setup: enter the API Key, Base URL, and Model.
  • Not supported: no verified direct setup is currently available.

Technical details

This setup uses https://bettertoken.ai/v1. The tool appends the OpenAI-compatible endpoint path. Do not add /chat/completions or /responses unless a specific field explicitly requires it.

Scope

This guide confirms LLM Chat through the OpenAI-compatible protocol only. Do not configure a GPT chat model as an embedding, rerank, speech, or image model.