Back to Blog
Guides

How to Set Up Shared AI for Every Client n8n Workflow

May 1, 2026·4 min read·Amit El
How to Set Up Shared AI for Every Client n8n Workflow

Setting an OpenAI key on a client's n8n credential, redoing it on the next client, and the next, is the kind of admin work that scales linearly with your client count. You also cannot see total agency-wide AI spend without logging into ten different OpenAI dashboards. By month three of running automations for clients, you have usually built a spreadsheet.

FlowEngine handles this differently. AI is part of the platform. Your account comes with a token balance you top up like a wallet, and every n8n instance you host can call any of 100+ models through the FlowEngine AI proxy. Spend rolls up to one bill, every client gets a budget, and you never paste an API key into a credential again.

What "shared AI" actually means here

FlowEngine bundles AI access via its own proxy. You do not bring an Anthropic or OpenAI key. You buy FlowEngine tokens at flat per-token pricing, and the proxy speaks to every supported provider on your behalf. From an n8n workflow, the AI nodes look identical to any other run: same model picker, same prompt input, same response shape. The credential type is FlowEngine, not Anthropic or OpenAI.

Two payment modes are available per instance:

  • You pay. Your token balance funds AI calls in this client's workflows. You see one usage line in your dashboard, charge the client a markup or bake it into their retainer.
  • Client pays. The client funds their own pool. You can top them up from your dashboard or let them top up themselves. You still see usage but you do not carry the cost.

Most agencies start with You-pay for simplicity, then graduate to Client-pays once one or two clients are burning enough to be on their own bill. Switching is one toggle, not a re-credentialing exercise.

Step 1: Top up your agency token balance

Open Settings → Account. The right-hand panel is Token Management.

flowengine settings account page with token management panel
Settings → Account. Token Management on the right shows current usage, top-up presets ($5 / $10 / $25 / $50), an Auto Top-up toggle, and a Purchase button.

Three useful controls:

  • Top-up Amount. Pick a preset or type a custom dollar value. The button below shows how many tokens you get for the amount; for example, $10 buys 200,000 tokens at the current rate. Click it, finish the Stripe checkout, the tokens land instantly.
  • Auto Top-up. Flip this on if you do not want to manage balances by hand. FlowEngine will charge the saved card and add tokens automatically when your balance gets low.
  • Current Usage. Tokens Remaining and Tokens Used at a glance. The Refresh button forces a sync after a big run.

Once your balance is positive, every n8n instance under your account can call AI through it. No per-instance setup needed for the You-pay default.

Step 2: Switch a client to client-pays mode

For a specific client, open the instance from the sidebar (Hosting → click the instance). On the instance detail view, the right column shows the AI Usage Payment panel with two buttons: You and Client. Click Client.

FlowEngine warns that switching modes restarts the n8n instance (it has to swap the proxy credential), and then routes every future AI call to the client's token pool instead of yours. The workflow code does not change. Existing executions complete on the old credential.

This is also where you flip back. If a client comes off retainer or you want to take billing in-house, click You and the next AI call lands on your tab again.

Step 3: Add tokens to a specific client

If you switched to client-pays and the client has zero tokens, AI calls in their workflows error out until you (or they) top them up. From the same instance detail view, the AI Usage & Top Up panel shows the client's Current Balance (Tokens Remaining and Tokens Used) and the same dollar preset buttons. Pick an amount, click Add Tokens to Client, finish Stripe checkout. Tokens land in the client's pool, AI calls resume.

If you would rather have the client pay for their own top-ups, send them the client portal link. Their portal has the same Token Management panel under their own account, charged to their card.

Step 4: Use Auto Top-up as a budget cap

FlowEngine does not have an explicit "monthly budget" knob today, but the structure of the system gives you the same effect. The pool is the budget. When the client's tokens hit zero, AI calls fail with a clear "no tokens" error. The workflow keeps executing, but the AI nodes return the error message that the client (and you) see in their execution history.

This is the one control that saves you from runaway-loop disasters. A workflow with a stuck retry can rack up hundreds of dollars in AI charges in an hour. Without a token cap, you find out at month-end. With one, the AI calls error out the moment the pool is empty, and you get a clear failure signal in real time.

For a hard ceiling, leave Auto Top-up off and only top up manually. For a soft ceiling that lets workflows keep running on a topped-up balance, leave Auto Top-up on but set the saved card's billing alerts in Stripe.

What 100+ models means in practice

Because the proxy speaks the OpenAI API protocol, the model list includes every Anthropic model, every OpenAI model, plus Mistral, Gemini, and 90 more, all addressable by name. Switching a workflow from Claude Opus to GPT-4o is changing one string in the AI node, not adding a credential.

If a client wants to A/B a model on a workflow, you do it without setting up a new account anywhere. The same FlowEngine credential covers the whole list, and tokens are deducted at the per-model rate the proxy charges (cheaper models stretch the balance further).

Try it

If you are managing AI keys per client today, this collapses your admin work to one balance you watch and one bill you pay. Sign in, open Settings → Account, top up $10 to start. Then flip one workflow's AI node from "OpenAI" to "FlowEngine" credential. If it runs the same, switch the rest.

GuidesAItutorialn8nCost TrackingAgencies