
Using n8n with PayPerQ
Run n8n's AI workflows on pay-per-use PayPerQ models instead of a subscription, by pointing n8n's Custom Endpoint Chat Model at the PayPerQ API.
What is n8n?
n8n is a workflow automation platform from n8n GmbH. You build workflows on a visual canvas by connecting nodes: triggers, app integrations, and AI nodes such as the Basic LLM Chain and AI Agent.
n8n can be self-hosted, which is the route this guide follows, or used as n8n Cloud. Its Custom Endpoint Chat Model node talks to any OpenAI-compatible endpoint, which is how a workflow can use PayPerQ models.
Step by Step Set Up
1. Prerequisites
- A PayPerQ account and API key. Copy the key from Your API key in the API workspace of the PayPerQ app.
- Docker with the
docker composev2 plugin installed and running. n8n's one-line setup requires thedocker composev2 plugin and checks that the Docker daemon is running.
Note: on n8n Cloud you don't need Docker. Skip to step 4 and open
/workflow/newon your n8n Cloud address instead ofhttp://localhost:5678.
2. Install and start n8n
Run this command in a terminal:
bashcurl -fsSL https://get.n8n.io | sh
The script checks for Docker and Docker Compose, creates an n8n folder in the current directory with compose.yml and .env, pulls the images (a few minutes on the first run) and starts n8n. When it finishes it prints n8n is running at: http://localhost:5678 and All set! Open http://localhost:5678 in your browser to get started.

Note: to stop n8n later, run
docker compose -f ./n8n/compose.yml down; to start it again, rundocker compose -f ./n8n/compose.yml up -d. The script prints both commands.
3. Create your owner account
Open http://localhost:5678 in a browser. n8n shows the owner setup screen.
- Set up owner account. Fill in Email, First Name, Last Name and Password (8+ characters, at least 1 number and 1 capital letter).

- Updates checkbox. Leave I want to receive security and product updates as you prefer.
- Next. Click Next. n8n opens its home screen with a Customize n8n to you dialog.
- Customize n8n to you. Click Get started. The questions can stay unanswered.
- Get paid features for free (forever). If this dialog appears, click Skip.
4. Create the workflow
You build a workflow with three nodes: a chat trigger, a Basic LLM Chain, and the Custom Endpoint Chat Model that sends the prompt to PayPerQ.
- Open
http://localhost:5678/workflow/new. - Click Add first step…. The panel What triggers this workflow? opens.

- Select On chat message. The node opens; close it with the X at the top right of the node window or by pressing Escape.
- Click the + to the right of the When chat message received node, search for Basic LLM Chain and select it. Close its window the same way.
- Click the + under the Model connector of the Basic LLM Chain, search for Custom Endpoint and select Custom Endpoint Chat Model. The node window opens with Credential, Model and API Format fields.

5. Add PayPerQ as the credential
In the Custom Endpoint Chat Model window, click Connect to Custom Model Endpoint. The Custom Model Endpoint account dialog opens.
- Base URL. Type
https://api.ppq.ai/v1. - Authentication. Leave Bearer Token.
- API Key. Paste
<your PayPerQ API key>. The field is masked.
- Save. Click Save, then close the dialog. The node's Credential field now shows Custom Model Endpoint account. n8n does not test this credential when you save it; a wrong key shows up when you send the test prompt in step 7.
Note: n8n's documentation says to set the Base URL to "the root your gateway serves the OpenAI API from, including any version segment", which is why the URL ends in
/v1.
6. Pick a model
In the same node window, leave Model on By ID and type this model ID in the field:
textupstage/solar-mini-4-5

Note: Solar Mini 4.5 costs $0.01055 per 1M input tokens and $0.0422 per 1M output tokens at the time of writing. See https://api.ppq.ai/v1/models for current prices.
Note: this is one example. Any ID from the full catalog at https://api.ppq.ai/v1/models can go in the Model field; type the catalog's
idvalue exactly, including the part before the slash.
Close the node window and save the workflow with Ctrl+S.
7. Send a test prompt
- Click Open chat at the bottom of the canvas.
- In Type message…, enter
Reply with the word OKand press Enter. - The chat shows OK as the reply, the Logs panel shows Success, and the Basic LLM Chain, the chat trigger and the Custom Endpoint Chat Model nodes get green check marks.

The setup is complete: n8n sends prompts to PayPerQ through the Custom Endpoint Chat Model. To use another model, change the Model field. To give an AI Agent a PayPerQ model, click the + under the agent's Chat Model connector, add a Custom Endpoint Chat Model and pick the same credential. Check what each request cost at ppq.ai/account-activity.
Troubleshooting
"Authorization failed - please check your credentials" and "Invalid API key" when you send a prompt. What happened: PayPerQ rejected the key n8n sent. Likely cause: the key was pasted with a missing character or belongs to a revoked key. Fix: open the node, click the pencil next to Credential, paste the key from the API workspace into API Key and save.
"Bad request - please check your parameters" and "… is not a valid model ID". What happened: PayPerQ does not know the ID in the Model field. Fix: copy the exact id from https://api.ppq.ai/v1/models, including the part before the slash.
The credential has no usable Base URL. What happened: n8n's docs list this when the Base URL is empty or not a valid HTTP/HTTPS URL. Fix: enter https://api.ppq.ai/v1 in the credential.
An "Editing in another tab" banner covers the workflow. What happened: the workflow is open in another browser tab or session. Fix: click Edit here in the banner.
Problems?
Please contact us through the customer communication chatbot in the bottom right of the PayPerQ site, in our Telegram channel or on Discord.
This guide is open source. If a step no longer works, open the guide on GitHub and use the pencil icon to propose a fix, or open an issue; changes go live after a PayPerQ maintainer reviews them.
What is PayPerQ?

PayPerQ is the private way to use AI. You get the big-name models from Anthropic, OpenAI, Google and xAI, the best open-source models, and TEE models that run inside a hardware enclave where not even the model's host can see your data. Chat, image, video and audio, all in one place, with no account and no subscription. You top up a balance with crypto or a card, from as little as 10 cents, and pay only for what you use. Most users spend about $4 a month, against $20+ for a single ChatGPT subscription.
Privacy is built in rather than bolted on. Every chat request is served inside a secure enclave that PayPerQ's servers, staff and logs cannot read into, so PayPerQ never sees your prompts or responses. Choose a TEE model and the model's host cannot read them either.
Why Use PayPerQ?
- Private by default - chats are served inside a secure enclave PayPerQ cannot read, and every chat model shows its privacy tier (Anon, ZDR or TEE)
- No account needed - no sign-up and no email; a credit id is all it takes
- Pay with crypto or card - Bitcoin, Lightning, Monero, stablecoins and more, or a credit card
- Hundreds of AI models from every major provider in one place
- Pay per use - no subscriptions; top up from 10 cents and pay only for what you use, about 1 cent per query on average
- Your history stays yours - conversations are stored on your device by default
Getting Started
- Visit ppq.ai
- Top up your balance with crypto or a card (as little as 10 cents)
- Pick a model, check its privacy tier, and start chatting
No account, no sign-up. Fund and go.