- Home
- Resources
- Integrations
- Vercel AI Gateway Chat Model
n8n Vercel AI Gateway Chat Model nodeConfigure Vercel AI Gateway Chat Model in n8n.
One node, one job: hand a chat model to something that reasons. The n8n Vercel AI Gateway Chat Model node is a sub-node, a helper node that attaches to a bigger one instead of running on its own. It exposes 9 parameters and clips onto the Model port of an agent or a chain.
Verified Trustpilot reviews · AI, automation & growth agency
What does the n8n Vercel AI Gateway Chat Model node do?
It supplies the language model that a root node uses to generate text. In n8n's AI setup, a root node such as AI Agent receives the workflow items on its main input, and sub-nodes clip onto its ports: one model, one memory, one output parser. This node fills the model slot, and it routes the call through Vercel AI Gateway rather than straight to a single provider.
The first thing to understand is that nothing happens when you run this node by itself. It has no main input. Open a workflow, drop an AI Agent, and the canvas shows an empty Model port underneath it. That port is where this node goes, and until something sits there the agent refuses to execute.
Scenario one: a support inbox that answers itself. A Gmail trigger picks up a new message, the agent reads it, and the model drafts a reply. Here Sampling Temperature is the parameter that matters, because a support answer that invents a refund policy is worse than no answer at all. Scenario two: turning free text into rows. A form fills a Google Sheets tab, and you need the model to return parsable output every time, which is what Response Format set to json_object is for. Scenario three: a digest posted to Slack every morning, where Maximum Number of Tokens keeps the summary short enough to read on a phone.
Choosing this node over a direct provider node is a routing decision, not a quality one. If your account already sends traffic through AI Gateway, this node keeps that path and loads the model list from the gateway itself. If you call one provider directly, the dedicated nodes are the shorter route: OpenAI, Anthropic or Google Gemini each have their own chat model sub-node.
Two limits worth knowing before you build. The model dropdown is loaded dynamically from AI Gateway, so it shows what your account can reach and nothing else, which means a workflow exported to another instance can land on a model that is not in the list there. And the node carries a single version, number 1, so an older workflow will not surprise you with missing options.
Billing stays where you expect it. n8n adds nothing on top of the node, while the model provider charges its own API calls under its own terms.
What do you need before the node runs?
- 01
Create the credential once
Open the Credentials menu in n8n and add the Vercel credential the node asks for. n8n stores it at instance level, so every workflow on that instance reuses the same entry instead of holding its own copy. Do this before you open the node panel and the dropdowns below will already have something to talk to.
- 02
Attach the node to a root node
Drag the node onto the Model port of an agent, a chain or another root node that accepts a language model. The connection is the execution path: the sub-node has no main input, so it only ever fires when the node above it calls for a completion. A node left floating on the canvas stays grey and never runs.
- 03
Pick the model
Open the node and choose a value in Model. n8n queries AI Gateway and lists the models your account can reach, which is why the list can differ from one instance to another. Leave the Options section alone on a first run, then come back and add the parameters you actually need.
Where does this node plug in?
n8n splits AI work between a root node that holds the logic and sub-nodes that supply the pieces, one type of piece per port.
Output (what it plugs into)
- Model
ai_languageModel
01Model
This is the only port the node uses, and it is an output: the node hands a chat model up to whatever root node is asking for one. The port type is ai_languageModel, so any root node that declares that port accepts this sub-node without extra configuration.
Key parameters
- Required: a root node cannot run without a model on this port.
- AI Agent: the usual host, when the workflow needs tool calls and a loop.
- Basic LLM Chain: one prompt in, one completion out, no tools.
- Information Extractor: pulls structured values out of raw text.
Which parameters do you actually set?
The Vercel AI Gateway Chat Model node has 9 parameters. For each one: the node as you configure it in n8n, what the parameter changes, and our field notes.
Parameters index
Model
modelWhat you see in n8n
Notes & use cases
Picks which model generates the completion. n8n loads the list from AI Gateway at the moment you open the dropdown, so what you see reflects your own account rather than a static catalog shipped with the node.
Key parameters
- Model: the dropdown itself, filled dynamically from the gateway; only models available to your account appear.
Frequency Penalty
options.frequencyPenaltyWhat you see in n8n
Notes & use cases
Raise it when the model keeps repeating the same line verbatim. Positive values penalize tokens based on how often they already appeared in the text, a token being the chunk of text a model reads and writes one at a time.
Key parameters
- Frequency Penalty: a number; higher values reduce the chance of the model repeating itself.
Maximum Number of Tokens
options.maxTokensWhat you see in n8n
Notes & use cases
Caps how long the completion is allowed to run. Set it and the model stops there, which is the simplest way to keep an answer inside a message field that has its own size limit.
Key parameters
- Maximum Number of Tokens: a number setting the completion length; most models have a context length of
2048tokens, except the newest ones which support32,768.
Response Format
options.responseFormatWhat you see in n8n
Notes & use cases
Two choices sit behind this one, and they change what the next node can do with the answer. Leave it on text for prose, switch it to JSON when a downstream node has to read fields rather than sentences.
Key parameters
- Text (
text): a regular text response. - JSON (
json_object): enables JSON mode, which should guarantee the message the model generates is valid JSON.
Presence Penalty
options.presencePenaltyWhat you see in n8n
Notes & use cases
Pushes the model toward subjects it has not brought up yet. Positive values penalize tokens based on whether they already appear in the text, which increases the chance of the answer moving on to something new.
Key parameters
- Presence Penalty: a number; higher values increase the chance of the model talking about new topics.
Sampling Temperature
options.temperatureWhat you see in n8n
Notes & use cases
Randomness lives here. Lowering it produces less random completions, and as the temperature approaches zero the model becomes deterministic and repetitive, which is exactly what you want in some workflows and useless in others.
Key parameters
- Sampling Temperature: a number; a higher temperature creates more diverse sampling but increases the risk of hallucinations.
Timeout
options.timeoutWhat you see in n8n
Notes & use cases
Every request gets a ceiling. This one is expressed in milliseconds and defines the maximum amount of time a request is allowed to take before the node gives up on it.
Key parameters
- Timeout: a number, in milliseconds, capping a single request.
Max Retries
options.maxRetriesWhat you see in n8n
Notes & use cases
When a call fails, the node can try again on its own before the whole execution stops. The value you enter is the maximum number of retries attempted, not the total number of calls.
Key parameters
- Max Retries: a number, the maximum retries per request.
Top P
options.topPWhat you see in n8n
Notes & use cases
Nucleus sampling is the other way to control diversity. A value of 0.5 means half of all likelihood-weighted options are considered, and lowering it tells the model to ignore the less probable ones.
Key parameters
- Top P: a number; the general recommendation is to alter this or the temperature, but not both.
Need help automating Vercel AI Gateway Chat Model with n8n?
A person reads every message.
Questions builders ask
01Is the n8n Vercel AI Gateway Chat Model node included with n8n?
02What do you need for it to work?
03What are the limits of this node?
04What is the minimum you have to plug in?
05n8n or Make for this kind of AI workflow?
Get our weekly integration tips.
No spam. Unsubscribe anytime.


