Short answer: All three tools take AICredits as an OpenAI-compatible provider. Use base URL https://api.aicredits.in/v1, your sk- key, and provider-prefixed model IDs like openai/gpt-4o-mini. In n8n it goes in the OpenAI credential, in Dify it is an OpenAI-compatible model provider, and in Open WebUI it is the OpenAI API base URL or two environment variables.
Disclosure: the aicredits.in links are affiliate links and I use the service. Every setting below comes from the AICredits community integration docs as read on 16 Oct 2026, and I have not re-run each setup screen in the latest version of each tool. Menus move between releases, so the field names are the part to match, not the click path.
You have a self-hosted automation or chat tool, and it wants an OpenAI key. You would rather pay in rupees, choose between Claude, Gemini and GPT per workflow, and cap spend per team. That is the whole case for pointing these tools at a gateway. AICredits' docs include roughly 30 community guides, and these three are the ones most people start with. For background on the service, see the AICredits review.
What do you need first?
- An account with a wallet top-up. Minimum is ₹50 by UPI, net banking or card, and there are no free credits, so add something small.
- An API key. Make a dedicated key per tool and set a budget in INR on it. The authentication docs say the key stops working when the budget is exceeded.
- A model ID. Open the models page and copy the exact string.
Run this pre-flight check before you touch any tool UI, so you know the key works and which IDs it can see:
curl https://api.aicredits.in/v1/models \
-H "Authorization: Bearer sk-your-key"
curl https://api.aicredits.in/v1/chat/completions \
-H "Authorization: Bearer sk-your-key" \
-H "Content-Type: application/json" \
-d '{"model":"openai/gpt-4o-mini","messages":[{"role":"user","content":"Reply with OK"}],"max_tokens":5}'
If the second call works from your server's shell, any failure afterwards is in the tool's settings, not the key or the network. That one habit saves most of the troubleshooting. I have not run these against a live key for this post; they follow the request shapes in the docs.
How do you set up n8n with AICredits?
The docs give three methods: the OpenAI node with custom credentials, the HTTP Request node, and the AI Agent node. Start with the credential, since the other two reuse it.
OpenAI node, custom credentials:
- Go to Settings, then Credentials, then Add Credential, and choose OpenAI API.
- Paste your AICredits key (it starts with
sk-) into the API Key field. - Expand Additional Fields and set Base URL to
https://api.aicredits.in/v1. - Save, then pick this credential in any OpenAI node.
- In the Model field, type the AICredits ID directly, for example
anthropic/claude-sonnet-4.5.
One credential then serves every provider: GPT in one node, Claude in the next, without separate keys.
HTTP Request node, for things the OpenAI node does not expose:
Method: POST
URL: https://api.aicredits.in/v1/chat/completions
Header: Authorization: Bearer <your key from an n8n credential>
Header: Content-Type: application/json
Body: {"model": "openai/gpt-4o-mini", "messages": [...], "max_tokens": 512}
To check the balance inside a workflow, GET https://api.aicredits.in/v1/credits. The docs suggest an IF node that stops the run when the balance drops below ₹10, which is a good guard before any expensive node.
AI Agent node: add the AI Agent node, add an OpenAI Chat Model sub-node, pick the AICredits credential, set the model ID, and connect tools. The docs note this runs a full ReAct loop and every intermediate model call is billed to your wallet, so give it a cheap model and a tool list you trust. The AI agents lesson explains the loop.
For a full workflow built on top of this, follow the n8n and Claude API tutorial for India. If you are still choosing a host, self-hosting n8n on a VPS covers that side.
How do you set up Dify with AICredits?
Dify wants an OpenAI-compatible model provider. Add one with these values:
| Setting | Value |
|---|---|
| Provider name | AICredits |
| API endpoint URL | https://api.aicredits.in/v1 |
| API key | sk-your-aicredits-key |
| Model type | Chat |
| Model name | exact ID from the models page |
Example IDs from the docs: openai/gpt-4o-mini, anthropic/claude-sonnet-4.5, google/gemini-2.5-flash, deepseek/deepseek-v4-flash. Verify each against the live list before you rely on it.
Then, in your Dify app:
- Open the model settings for the app, workflow or agent node.
- Choose
AICreditsas the provider. - Select or type the model ID.
- Run one cheap test prompt.
The Dify page is explicit that you must keep the /v1 suffix. For RAG apps it suggests starting with a fast model like openai/gpt-4o-mini and moving to a larger one only for final answers that need it. Store the key in provider settings, not in prompts or workflow variables, and use a dedicated key with a monthly budget cap for each shared workspace. To decide whether Dify is the right framework at all, compare it in Dify vs LangChain vs LlamaIndex.
Smoke test from the docs: create a chat app and ask it to reply with "AICredits via Dify" and nothing else, then confirm the request shows up with the right model and cost in your dashboard usage page.
How do you set up Open WebUI with AICredits?
In the admin settings, add an OpenAI-compatible connection:
| Setting | Value |
|---|---|
| API base URL | https://api.aicredits.in/v1 |
| API key | sk-your-aicredits-key |
| Model | pick from the models page |
For Docker deployments, set two environment variables and restart the container:
OPENAI_API_BASE_URL=https://api.aicredits.in/v1
OPENAI_API_KEY=sk-your-aicredits-key
Suggested starting models from the docs: openai/gpt-4o-mini for general chat, anthropic/claude-sonnet-4.5 for coding help, google/gemini-2.5-flash for long documents, deepseek/deepseek-v4-flash for fast low-cost chat. Treat these as starting points and check them against the live catalog, which changes.
If several people use the instance, give it its own key with a budget cap. Also do not expose it without authentication. The Open WebUI with vLLM or Ollama gateway post shows how to mix local and hosted models behind one UI.
How do five other tools compare?
The same pattern repeats across the other guides in the docs:
| Tool | Where the setting lives | Base URL | Notes from the docs |
|---|---|---|---|
| LibreChat | librechat.yaml, endpoints.custom entry | https://api.aicredits.in/v1 | Key via ${AICREDITS_API_KEY} in .env; restart after changes |
| Flowise | ChatOpenAI node, base path / base URL field | https://api.aicredits.in/v1 | Field name varies by version |
| Langflow | OpenAI chat model component | https://api.aicredits.in/v1 | Or set OPENAI_BASE_URL and OPENAI_API_KEY in the container |
| AnythingLLM | LLM provider, Generic OpenAI | https://api.aicredits.in/v1 | Pick the model as workspace default |
| LobeChat | OpenAI provider settings | https://api.aicredits.in/v1 | The field may be called proxy URL; env var is OPENAI_PROXY_URL |
Different names, one value. If your tool is not listed, look for any field called base URL, base path, proxy URL or endpoint, and put the same string there.
Troubleshooting table
| Symptom | Likely cause | Fix |
|---|---|---|
| 401 Unauthorized | Old, mistyped or revoked key | Paste a current AICredits key; test it with the curl above |
| Model not found | Wrong or invented model ID | Copy the exact ID from the models page or GET /v1/models |
| Connection fails | Base URL is the bare domain, missing /v1 | Use https://api.aicredits.in/v1 exactly |
| No models in a dropdown (Open WebUI) | Connection not authenticating | Call GET /v1/models with the same key |
| 402 on a request | Wallet empty or the key hit its INR budget | Top up, or raise the key's budget |
| 429 | Per-key request limit hit; the docs mention a default of 60 RPM | Slow the workflow or batch less aggressively |
| Works in curl, fails in container | Env vars not reloaded | Restart the container after changing .env |
| Env var ignored | UI field overrides it | Use the UI base URL field when one exists |
When you see an error that is not here, check the request in your dashboard usage log first. If the request never appears, the tool never reached AICredits, and the problem is the URL or network. If it appears with an error status, the problem is the key, model or balance.
Keep the bill predictable
Three habits are worth the minute they take:
- One key per tool, each with an INR budget, so a loop in one workflow cannot take down the others.
- A cheap default model for classification and extraction, with the larger model reserved for the final step. The n8n docs suggest this pattern, though the claim of 80 to 90 percent savings is theirs, not mine, and depends entirely on your mix.
- A balance check at the start of long workflows.
Estimate before you commit with the free AICredits budget simulator, and see the walkthrough of the free AICredits tools for a worked budget example.
If you want to try this, create a small-budget key at AICredits, run the curl check, then configure the one tool you actually use. Do that first, add the rest later.



