Connect n8n to PromptUnit
n8n's AI nodes (AI Agent, OpenAI Chat Model, Basic LLM Chain) use an OpenAI credential. Change two settings in that credential and every workflow that uses it runs through PromptUnit.
Get your PromptUnit key
Sign up free at PromptUnit (no credit card) and connect the AI provider key you already use, for example your OpenAI or OpenRouter key. Your requests keep running on that key.
Then open API Keys in your dashboard and copy your PromptUnit key. Connecting more than one app? Under Routing, + New routing gives each app its own key and settings.
Create the credential
In n8n, open Credentials, click Create credential, search for OpenAI and choose it. Fill in:
API Key
your PromptUnit key from Step 1Base URL
the address for the provider whose key you connected (below)Your OpenAI key
https://www.promptunit.ai/api/proxy/openaiYour OpenRouter (models from many providers) key
https://www.promptunit.ai/api/proxy/openrouterYour Google Gemini key
https://www.promptunit.ai/api/proxy/googleYour Groq key
https://www.promptunit.ai/api/proxy/groqYour DeepSeek key
https://www.promptunit.ai/api/proxy/deepseekLeave Organization ID empty. Save: n8n checks the connection and should say it was tested successfully.
Use it in your workflow
In the OpenAI Chat Model node (under an AI Agent or a Basic LLM Chain), choose the credential you just made, then pick the model from the list. The list shows the models your own provider account can use.
Run the workflow and watch the costs
Each request shows up on your PromptUnit dashboard with what it cost. PromptUnit checks every request and uses a cheaper model only when it would answer just as well; otherwise it uses the model you picked. Your first $5 of savings is free, no card needed.
If something doesn't look right
"Couldn't connect with these settings": check that the Base URL ends at the provider name (for example /openai, with or without /v1), and that the same provider's key is connected in PromptUnit. The error message says which one is missing. PromptUnit handles chat requests: nodes that make images, audio or embeddings need a separate credential that points at your provider directly.
Quick reference
The address you'll paste in, if you need it again:
https://www.promptunit.ai/api/proxy/openai