Resources · n8n integration

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

Why automate

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.

Connect

What do you need before the node runs?

  1. 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.

  2. 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.

  3. 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.

Connections

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)

  • Modelai_languageModel
01ModelThis 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.

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.
Use cases
the same node instance can serve a AI Agent Tool in one branch and a Summarization Chain in another, since each root node calls it on its own schedule.
Parameters

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.

01

Model

model

What 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.
Use cases
swap the value on a chain that drafts marketing copy without touching any other part of the workflow, since every other parameter stays where it is.
02

Frequency Penalty

options.frequencyPenalty

What 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.
Use cases
a product description generator that keeps opening every paragraph with the same clause is the textbook case for nudging this up a notch.
03

Maximum Number of Tokens

options.maxTokens

What 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 2048 tokens, except the newest ones which support 32,768.
Use cases
a daily digest that has to fit in one chat message rather than scroll for a full screen.
04

Response Format

options.responseFormat

What 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.
Use cases
extracting a name and an amount from an incoming email before writing them into a spreadsheet row.
05

Presence Penalty

options.presencePenalty

What 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.
Use cases
a brainstorming step that keeps circling back to the same angle and needs to spread out instead.
06

Sampling Temperature

options.temperature

What 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.
Use cases
a classification step that must return the same label for the same input every single run.
07

Timeout

options.timeout

What 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.
Use cases
a workflow triggered by a form submission, where a visitor watching a spinner deserves a failure faster than a slow answer.
08

Max Retries

options.maxRetries

What 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.
Use cases
an overnight batch nobody is watching, where one failed call should not kill a run that has already processed hundreds of items.
09

Top P

options.topP

What 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.
Use cases
tightening a drafting step that already sits at a fixed temperature you would rather not touch again.
Need help

Need help automating Vercel AI Gateway Chat Model with n8n?

A person reads every message.

FAQ

Questions builders ask

01Is the n8n Vercel AI Gateway Chat Model node included with n8n?
Yes. It ships inside the n8n AI package, so there is nothing to install and no extra cost on the n8n side, whether you run n8n Cloud or a self-hosted instance under the Community Edition and its Sustainable Use license. The node is the same in both cases, and so is the workflow you build around it. What does carry a cost is the model provider, which bills its own API calls under its own terms. n8n adds nothing on top of that.
02What do you need for it to work?
A credential and a host node. The credential is created once from the Credentials menu in n8n and then reused across every workflow on that instance, so you never paste the same thing twice. The host node is any root node with a Model port: an agent, a chain, an extractor. Without that connection the sub-node has no main input of its own and will never execute. Once both are in place, the only field left to fill is Model, which n8n populates from AI Gateway.
03What are the limits of this node?
It generates completions and nothing else. There is no memory in it, no tool calling of its own, no document loading: those live in other sub-nodes that plug into other ports of the same root node. The model list is whatever AI Gateway exposes to your account, so a workflow moved to another instance can point at a model that is not offered there. The node also has a single version, so the parameters you see are the parameters there are, with no older variant carrying fewer options.
04What is the minimum you have to plug in?
One root node and one model, which is this node. Start with Basic LLM Chain if you just want a prompt to come back with an answer, because it does one pass and stops. Move to AI Agent when the workflow needs to call tools or loop over a decision. On the node itself, pick a value in Model and leave the Options section untouched for the first run. Add Sampling Temperature or Response Format afterwards, once you have seen what the default output actually looks like.
05n8n or Make for this kind of AI workflow?
It depends on where you want the workflow to live. Make is hosted by Make, with no self-hosting option and billing counted per operation, which suits teams that would rather not run anything themselves. n8n runs on Docker or npm on your own machine or on n8n Cloud, and the same workflow behaves identically in both. If your AI calls touch customer data you would rather keep on your own servers, self-hosting settles the question. If the visual logic and a hosted setup matter more, Make is a fair answer.
Hack'celeration Lab

Get our weekly integration tips.

No spam. Unsubscribe anytime.