Integrations
n8n
n8n with AI Tokens: an OpenAI credential with AI Tokens's base URL, the OpenAI Chat Model with the Responses API switched off, and embeddings in batches of 32.
Last updated: 2026-11-03
Credential
Create an OpenAI credential:
| Field | Value |
|---|---|
| API Key | your key, sk-at-… |
| Organization ID (optional) | empty |
| Base URL | https://api.aitokens.ch/v1 |
n8n checks the credential by reading https://api.aitokens.ch/v1/models.
OpenAI Chat Model
The OpenAI Chat Model node, under an AI Agent or a chain:
| Setting | Value |
|---|---|
| Credential | the one above |
| Model | By ID: gemma-4-26b, or another chat model of the catalogue |
| Use Responses API | off |
| Options → Maximum Number of Tokens | 32768 or less, or leave it unset |
From List shows every model of /v1/models, including those that do not
chat, such as bge-m3 and whisper-1. By ID avoids picking one of them.
For an AI Agent with tools, use a model that calls them: the Tools column of Which model says which.
Embeddings OpenAI
For a vector store, the Embeddings OpenAI node with the same credential:
| Setting | Value |
|---|---|
| Model | bge-m3 |
| Options → Batch Size | 32 |
The node sends 512 texts per request by default, and /v1/embeddings takes at
most 32. The vectors have 1,024 dimensions: set the vector store to match, and
leave Dimensions unset.
auto
auto as the model ID lets the API choose the model for each
call, which suits workflows that mix short classifications and longer
answers. An agent's tool calls stay on the model that asked for them.
Limits
- Maximum Number of Tokens up to 32,768, the most n8n allows too; the
API refuses more with
422. - On a model that reasons the reasoning counts against that maximum: a low value gives a cut or empty answer.