Skip to content
unboxth
AI Automation

n8n AI Agent Cost: On Small Models, the Fee Is 10x Tokens

Every n8n agent run has two bills, and which one matters depends on the model: $0.85 vs $17 per 1,000 turns between a small and a frontier model.

Saksham Dogra 9 min read Updated on

Line-art workflow of three connected nodes feeding a coin stack, with one node highlighted in blue

An n8n AI agent has two bills. n8n charges one execution for each production run, which for a chatbot is each message a user sends: on Cloud Starter that’s $20 a month (billed annually) for 2,500 runs, or $0.008 a run. The model’s tokens are billed on top. At an assumed 6,000 input and 500 output tokens per turn, a turn costs about $0.00085 on Claude Haiku 5.5 or GPT-6 Luna and about $0.017 on Claude Sonnet 5.5 or GPT-6.1 Sol. That’s $0.85 vs $17 per 1,000 turns (C$1.19 vs C$23.86; A$1.21 vs A$24.10).

Run your own numbers in the n8n vs Make vs Zapier cost calculator.

The token counts are a modelled assumption, not a measurement. Measure 20 real runs of your own agent before you budget (the checklist below shows how). Prices checked 29 Oct 2026 on n8n.io, app.n8n.cloud, Anthropic’s and OpenAI’s pricing pages. CAD at the Bank of Canada rate of 1.4036 (28 Oct 2026) and AUD at the RBA rate of 0.7053 USD per AUD (29 Oct 2026). Prices exclude any sales tax, GST or HST.

How much does an n8n AI agent cost per run?

Bill What it charges for Typical size per turn Where you see it
n8n execution One production run of the workflow, however many nodes or tool calls it has $0.0024 to $0.0096 on Cloud (see below); $0 self-hosted n8n Cloud usage page
Model tokens Input (system prompt, memory, tool definitions, tool results) and output tokens, every model call $0.00085 (small model) to $0.034 (Opus 5.5) at our assumption Gateway credits page, or your provider’s console

The execution share. Divide the plan price by its execution allowance (n8n pricing, US view, 29 Oct 2026):

n8n Cloud plan Price (annual / monthly billing) Executions per month Cost per execution (annual / monthly)
Starter $20 / $24 2,500 $0.008 / $0.0096
Pro $50 / $60 10,000 $0.005 / $0.006
Pro, 50k tier $120 / $144 50,000 $0.0024 / $0.00288
Self-hosted Community Edition $0 license + your server No quota Server cost ÷ runs

That share only holds if you use the whole allowance. An agent that handles 300 messages a month on Starter really costs $20 ÷ 300 = about $0.067 a run.

What counts as an execution for an AI agent

n8n’s docs define an execution as “a single run of a workflow” and say only production executions count toward your quota: runs started by triggers, schedules or polling (n8n docs). Specifically:

  • Webhook triggers count one execution for every inbound request that activates them, including empty-body requests.
  • Manual test runs in the editor don’t count.
  • Sub-workflows called with Execute Sub-workflow don’t count separately; only the parent does.
  • Error workflows don’t count.

For a chat agent, that means one execution per user message that reaches a published workflow, because each message starts a new run (that’s our reading of how chat triggers work: confirm it in your own execution list). Ten back-and-forth messages in one conversation are ten executions. The agent’s internal loop (call model, call tool, call model again) happens inside that one execution.

n8n AI credits explained: Gateway vs Assistant vs your own key

The “n8n AI credits” confusion comes from there being two credit types plus the option to skip both.

Gateway credits Assistant credits Your own API key
Pays for AI models and tool services used by nodes in your workflows Your conversations with n8n Assistant (the helper that builds workflows) Whatever that provider bills you
Doesn’t pay for n8n Assistant Model calls your workflows or agents make when they run n8n’s execution fee
Plans Cloud Starter and Pro only, from n8n 2.36.0; not Enterprise or self-hosted Cloud Starter and Pro (monthly allowance); self-hosted uses your own provider Every plan, Cloud or self-hosted
How you get it Small free amount at sign-up; prepaid top-ups on paid plans Monthly allowance that resets on the 1st (midnight UTC); optional extra credits Your OpenAI, Anthropic or Google account
Expiry Top-ups expire 12 months after purchase; non-refundable Included credits don’t roll over; extra credits expire after 12 months Per provider

Sources: Gateway credits and Assistant credits docs. The size of each plan’s Assistant allowance is on the pricing page; we haven’t listed it here because it isn’t what runs your agent.

When to use Gateway credits: you want one bill and no provider accounts, or you’re prototyping. When to use your own key: you’re on Enterprise or self-hosted (Gateway isn’t available), you want provider-side features like batch discounts, or you need a data agreement directly with the provider. n8n’s docs note that with Gateway credits the provider sees your request content but not your identity, because calls go through n8n’s own provider account.

Which models you can use with Gateway credits, and what they cost

All prices per 1 million tokens, input / output, checked 29 Oct 2026:

Model n8n Gateway rate Provider list rate Notes
claude-haiku-5-5 $0.10 / $0.50 $0.10 / $0.50 $0.50 / $2.50 for prompts over 100k tokens
claude-sonnet-5-5 $2 / $10 $2 / $10
claude-opus-5-5 $4 / $20 $4 / $20
gpt-6-luna $0.10 / $0.50 $0.10 / $0.50
gpt-5-mini $0.25 / $2 Not on OpenAI’s current flagship table Older model, still on Gateway
gpt-6.1-terra $1 / $5 $1 / $5
gpt-6.1-sol $2 / $10 $2 / $10
gemini-4-argon $2 / $10 Not checked n8n calls this an introductory price until December 1, 2026

Sources: n8n service pricing, Anthropic pricing, OpenAI pricing. Anthropic also notes that Claude 4.7 and later models use a tokenizer that produces “approximately 30% more tokens for the same text” than earlier models, so token counts from an older model’s logs will undercount.

Cost per 1,000 agent runs by model (USD, CAD, AUD)

Assumption: 6,000 input and 500 output tokens per turn, one model call per turn, no caching. Token cost only:

Model Per turn Per 1,000 turns (USD) CAD AUD
Claude Haiku 5.5 or GPT-6 Luna $0.00085 $0.85 C$1.19 A$1.21
GPT-5 mini (Gateway) $0.0025 $2.50 C$3.51 A$3.54
GPT-6.1 Terra $0.0085 $8.50 C$11.93 A$12.05
Claude Sonnet 5.5, GPT-6.1 Sol or Gemini 4 Argon (intro) $0.017 $17.00 C$23.86 A$24.10
Claude Opus 5.5 $0.034 $34.00 C$47.72 A$48.21

Now add n8n. On Starter billed annually, 1,000 runs use $8 worth of the plan if you fill it:

Model Tokens per 1,000 turns + Starter execution share ($8) Share of total that is n8n
Haiku 5.5 / GPT-6 Luna $0.85 $8.85 90%
GPT-6.1 Terra $8.50 $16.50 48%
Sonnet 5.5 / GPT-6.1 Sol $17.00 $25.00 32%
Opus 5.5 $34.00 $42.00 19%

That’s the main takeaway: on a small model, the n8n plan is your real cost, and moving to self-hosted n8n saves far more than switching models. On a frontier model, tokens dominate and model choice matters most.

Why agent runs cost more than one AI step

An AI Agent node isn’t one model call. When the agent decides to use a tool, the typical loop is:

  1. Call the model with the system prompt, memory, tool definitions and the user message.
  2. The model asks for a tool; n8n runs it.
  3. Call the model again with everything from step 1 plus the tool result.

So a turn with one tool call sends the input context twice. At our assumption, that roughly doubles input tokens: about $0.00145 instead of $0.00085 on Haiku 5.5, still one n8n execution. Tool definitions add tokens to every call too; Anthropic lists a tool-use system prompt of 286 tokens on Claude 5.5 models with tool choice auto.

If your workflow just needs one prompt in and one answer out (classify a lead, summarize an email), a Basic LLM Chain is cheaper than an agent. Our n8n lead generation workflow uses that cheaper pattern.

Free n8n AI agent template (importable JSON)

A minimal support agent: Chat Trigger → AI Agent with Simple Memory (last 5 exchanges), an Anthropic chat model, and one HTTP Request tool that looks up order status. Max iterations is set to 4 so a confused agent can’t loop and burn tokens.

{
  "name": "Support agent (unboxth starter)",
  "nodes": [
    {
      "parameters": { "public": true, "options": {} },
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "typeVersion": 1.1,
      "position": [0, 0]
    },
    {
      "parameters": {
        "options": {
          "systemMessage": "You are a support agent for Example Co. Answer in under 80 words. Use the order_status tool only when the user gives an order number. If unsure, say you will hand off to a human.",
          "maxIterations": 4
        }
      },
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.7,
      "position": [260, 0]
    },
    {
      "parameters": { "model": "claude-haiku-5-5", "options": { "maxTokensToSample": 400 } },
      "name": "Anthropic Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "typeVersion": 1.3,
      "position": [180, 220]
    },
    {
      "parameters": { "contextWindowLength": 5 },
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [320, 220]
    },
    {
      "parameters": {
        "toolDescription": "order_status: look up the shipping status of an order. Input: the order number.",
        "url": "https://api.example.com/orders/{{ $fromAI('order_number') }}",
        "options": {}
      },
      "name": "order_status",
      "type": "n8n-nodes-base.httpRequestTool",
      "typeVersion": 4.2,
      "position": [460, 220]
    }
  ],
  "connections": {
    "When chat message received": { "main": [[{ "node": "AI Agent", "type": "main", "index": 0 }]] },
    "Anthropic Chat Model": { "ai_languageModel": [[{ "node": "AI Agent", "type": "ai_languageModel", "index": 0 }]] },
    "Simple Memory": { "ai_memory": [[{ "node": "AI Agent", "type": "ai_memory", "index": 0 }]] },
    "order_status": { "ai_tool": [[{ "node": "AI Agent", "type": "ai_tool", "index": 0 }]] }
  }
}

To use it: in n8n, create a new workflow, paste the JSON onto the canvas, then open the Anthropic node and pick either Gateway credits or your own Anthropic credential. Replace the example URL with your real order API. Node typeVersion numbers change between n8n releases; if a node shows a warning after import, open it and let n8n update it. We built this as a starting point and haven’t tested it on every n8n version.

How to cap AI agent costs in n8n

  • Set max iterations. It limits how many model-tool loops one turn can take.
  • Keep memory short. A 5-exchange window instead of 20 cuts input tokens on every turn.
  • Route with a small model. Use Haiku 5.5 or GPT-6 Luna to classify the request, and only send hard cases to Sonnet or Sol.
  • Cap output. A max-tokens setting stops long rambles; output tokens cost 5x input on most models above.
  • Use prompt caching where your provider supports it. Anthropic prices cache hits at 0.1x input on Haiku 5.5 and 0.05x on Sonnet and Opus 5.5. Whether n8n’s nodes send cache headers depends on the node and version; check your provider’s usage logs.
  • Watch Gateway spend. The Gateway credits page in the Cloud console shows spend over time, and top-ups can be manual or automatic.

Measure your own cost (20-run checklist):

  • Publish the workflow and send 20 realistic messages.
  • For each execution, note input and output tokens from the model node’s output (or your provider’s usage log).
  • Average them, then multiply by your model’s rates above.
  • Count executions per conversation from the executions list.
  • Add your plan’s execution share at your real monthly volume, not the full allowance.

When the n8n plan, not the tokens, is the bigger bill

Using the tables above:

  • Under about 2,500 messages a month on a small model: Starter’s $20 (C$28.07, A$28.36) is nearly the whole bill. Tokens are under $3.
  • 2,500 to 10,000 messages: Pro at $50 (C$70.18, A$70.89) annual. Tokens on Haiku would be $2 to $9.
  • Beyond 10,000 messages: Pro’s 50,000 tier at $120 annual or $144 monthly, or self-host. See n8n self-hosted vs cloud cost.
  • Any volume on Sonnet/Sol or Opus: tokens overtake the plan quickly. 10,000 turns on Sonnet 5.5 is about $170 in tokens versus $50 for Pro.

If you’re still choosing a platform, n8n vs Make vs Zapier pricing compares how each bills multi-step workflows, and Zapier alternatives covers the wider field. For AI coding tool prices, see Claude Code vs Codex vs Cursor pricing. More guides live in the AI automation hub.

To price your own token counts across Claude, GPT and Gemini, use the free LLM API Cost Calculator.

Frequently asked questions

Does each AI agent tool call count as a separate n8n execution?
No. n8n counts an execution as one run of a workflow, so an agent that calls a tool three times inside one run is still one execution. Tool calls do add model calls and tokens, which is where the extra cost shows up.
What are n8n AI credits?
There are two kinds. Assistant credits are a monthly allowance that pays only for n8n Assistant, the helper that builds workflows with you. Gateway credits are a prepaid balance that pays for AI models and tools used by nodes in your workflows. They are separate balances.
Can I use my own OpenAI or Anthropic API key on n8n Cloud?
Yes. Gateway credits are optional. You can create a credential with your own provider key, and n8n's docs say nodes using your own credentials keep working even when your Gateway balance hits zero.
Are n8n Gateway prices higher than buying from OpenAI or Anthropic directly?
For the models we compared on 29 Oct 2026 (Claude Haiku 5.5, Sonnet 5.5, Opus 5.5, GPT-6 Luna, GPT-6.1 Terra and GPT-6.1 Sol), n8n's service pricing page listed the same per-token rates as the providers' own pricing pages. n8n says rates change as providers update theirs.
Is there a free n8n AI agent?
Self-hosted Community Edition has no execution fee, but you still pay the model provider for tokens. New Cloud users get a small amount of free Gateway credit, and trials include some, but you can't top up during a trial.
What happens when Gateway credits run out?
Nodes that use Gateway credits stop working until you add credit. Nodes using your own credentials aren't affected. If the balance runs out mid-execution, n8n lets in-flight requests finish and deducts the difference from your next top-up.

Sources

  1. 1. n8n plans and pricing n8n.io
  2. 2. n8n Docs: Understand executions docs.n8n.io
  3. 3. n8n Docs: Gateway credits docs.n8n.io
  4. 4. n8n Docs: Assistant credits docs.n8n.io
  5. 5. n8n Cloud service pricing (Gateway credit rates) app.n8n.cloud
  6. 6. Anthropic API pricing docs.anthropic.com
  7. 7. OpenAI API pricing developers.openai.com
  8. 8. Bank of Canada USD/CAD daily exchange rate (Valet API) bankofcanada.ca
  9. 9. Reserve Bank of Australia exchange rates (F11.1) rba.gov.au
SD

Saksham Dogra

Founder, unboxth

Saksham Dogra is the founder of unboxth. He writes founder to founder about building an AI startup from anywhere: company setup, costs, tools and fundraising.

On this page

More in AI Automation

View all

Menu

Topics

unboxth

Subscribe