Skip to main content

Workflow automation · ScaleMax integration

Use GPT, DeepSeek and more in n8n with a ScaleMax key

n8n’s OpenAI credential takes a custom Base URL. Attach it to the AI Agent’s OpenAI Chat Model sub-node, type an exact model ID, and every model your key includes runs in the same workflow.

Updated November 23, 2026
Choose in the client
An OpenAI credential with a custom Base URL, on the AI Agent’s OpenAI Chat Model sub-node
Protocol
OpenAI Chat Completions
ScaleMax installer
Manual setup
Video lesson
Not yet

n8n settings for ScaleMax

Enter these values in n8n. A Pay as you go key and a token pack key use different base URLs — use the one that matches the key you bought.

Node
Value
AI Agent → Chat Model → OpenAI Chat Model (not the standalone OpenAI node)
Credential
Value
A new OpenAI credential, for example named “ScaleMax API”
API Key
Value
Your full ScaleMax key
Base URL
Value
https://api.scalemax.pro/v1 (Pay as you go key) or https://api.scalemax.pro/token/v1 (token pack key)
Organization ID
Value
Leave empty
Model
Value
Switch from “From List” to “ID” and type one exact model ID, for example gpt-5.6-luna or gpt-6-sol
Use Responses API
Value
Off (node version 1.3 and later turn it on by default), so the node sends Chat Completions
Check the key outside n8n (macOS / Linux)
curl "https://api.scalemax.pro/v1/chat/completions" \
  -H "Authorization: Bearer $SCALEMAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.6-luna",
    "max_tokens": 16,
    "messages": [{"role": "user", "content": "Reply with exactly OK"}]
  }'

Step by step

  1. Add an AI Agent node. n8n adds the Chat Trigger (“When chat message received”) for you; keep that wiring.
  2. Click the agent’s Chat Model connector and choose OpenAI Chat Model.
  3. Under Credential to connect with, create a new credential: paste the ScaleMax key, set Base URL to the URL that matches your key, leave Organization ID empty, and save.
  4. Set Model to ID mode and type one exact model ID, such as gpt-5.6-luna or gpt-6-sol.
  5. If the node shows Use Responses API, switch it off so the node sends standard Chat Completions requests.
  6. Open the chat panel and send “Reply with exactly OK”. A short reply confirms the key, Base URL and model ID together.

Installer support

The ScaleMax installer does not configure n8n. One credential and one node setting are all it needs; the ScaleMax n8n guide also has an importable starter workflow.

Models to use in n8n

Rates are the published ScaleMax rates per million tokens, read from the live catalogue. Your key must include a model before n8n can call it — GET /v1/models with the key lists exactly which.

GPT models

gpt-6.1-sol
Input / 1M tokens
$2
Output / 1M tokens
$10
gpt-6-sol
Input / 1M tokens
$2
Output / 1M tokens
$10
gpt-6-luna
Input / 1M tokens
$0.10
Output / 1M tokens
$0.50

Good to know

  • Other families use the same node and credential: deepseek-v4.1-flash and glm-5.2 both work, but each needs a key scoped to that exact model — on any other key the request is refused with a 403.
  • n8n sends no output limit unless you set one. For agents and structured output, set Maximum Number of Tokens in the node options to a few thousand so long answers are not cut off.
  • The OpenAI Chat Model sub-node also works under a Basic LLM Chain. For raw responses, the HTTP Request node with Header Auth (Authorization: Bearer and the key) calls /chat/completions directly.
  • Workflow exports never contain the key: n8n stores credentials separately and the workflow only references the credential by name.

Troubleshooting

The credential test passes, then every run fails with a 404
You used the standalone OpenAI node, which has a custom base URL bug (n8n issue #21651). Use the OpenAI Chat Model sub-node under an AI Agent or Basic LLM Chain.
401 Invalid API key with a key that works elsewhere
The key and Base URL belong to different billing modes. A token pack key only works on /token/v1; a Pay as you go key only on /v1.
Requests go to a doubled path such as /v1/chat/completions/chat/completions
The Base URL must end at /v1 (or /token/v1). n8n adds the endpoint path itself.
“Model output doesn’t fit required format”
The answer was cut off by the output limit. Set Maximum Number of Tokens in the node options and keep a structured output schema small.

n8n's field names on this page were checked against n8n: OpenAI Chat Model node on November 23, 2026. If n8n has renamed a setting since, follow its documentation and keep the ScaleMax values above.

ScaleMax is not affiliated with the makers of n8n. Compatibility describes the API protocol; n8n's own features and plans are provided by its developer.

n8n and ScaleMax: questions

Can n8n use a custom OpenAI-compatible base URL?

Yes. n8n’s OpenAI credential has a Base URL field. Set it to https://api.scalemax.pro/v1 (or https://api.scalemax.pro/token/v1 for a token pack key) and attach the credential to the OpenAI Chat Model node.

Which models can I use in n8n with ScaleMax?

Any chat model your key includes, through the same OpenAI Chat Model node: for example gpt-5.6-luna or gpt-6-sol. deepseek-v4.1-flash and glm-5.2 need a key scoped to that exact model. GET /v1/models with the key lists what it can call.

Why does the standalone OpenAI node fail with a custom base URL?

Its current version has a known bug with custom base URLs (n8n issue #21651): the credential test passes and real requests return 404. The OpenAI Chat Model sub-node is not affected.

Run n8n on a prepaid key

Pay by card or crypto, copy the base URL and model ID, and you are coding in minutes. No subscription.