Skip to content
Sign Up Free
AI application platform setup

n8n BetterToken setup: API key, Base URL, and custom models

Connect n8n to BetterToken with a Base URL, API key, and available model, then verify the connection and fix common errors. Practical guidance.

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

FieldValue
API KeyBetterToken API key
Base URLhttps://bettertoken.ai/v1
ModelA current Model ID from the model plaza

Prerequisites

Additional requirements

  • An n8n Cloud or self-hosted instance
SettingValue
Credential typeOpenAI
Base URLhttps://bettertoken.ai/v1
API Keyyour BetterToken API key
Organization IDleave blank
Custom Headeroff

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.

FieldValue
API KeyBetterToken API key
Base URLhttps://bettertoken.ai/v1
ModelA current Model ID from the model plaza

Setup

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.

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.

Enter the BetterToken credential

Use these values:

n8n fieldValue
API Keyyour BetterToken API Key
Organization ID (optional)leave blank
Base URLhttps://bettertoken.ai/v1
Add Custom Headeroff

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

Select a model

Return to OpenAI Chat Model, open Model, and select the model ID 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.

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.

Run a test

Give the AI Agent a simple input:

Reply with exactly: Connection successful

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
  • Copy the exact Model ID from the model plaza.
  • 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

Technical details

Protocol, endpoint, and internal provider fields

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.