- A PromptAvenue account with API balance.
- n8n 2.50.0 or later with access to the workflow editor and credential creation.
Connect an n8n AI Agent to a Custom Chat Model Endpoint
In n8n 2.50.0 or later, create a Custom Model Endpoint credential for https://api.promptavenue.com/v1 with your PromptAvenue API key. Connect Custom Endpoint Chat Model to the AI Agent, select an Uncensored model, and set API Format to Chat Completions. Ask the agent to compute 8 × 7 with Calculator, then check for 56 and a Calculator run in the execution.
What you need
1. Create a PromptAvenue API key
In the PromptAvenue dashboard, open the API keys page and select Create API key. Copy the full key when it appears.
2. Create a credential for the OpenAI-compatible base URL
Create a Custom Model Endpoint credential named PromptAvenue.
| Field | Value |
|---|---|
| Base URL | https://api.promptavenue.com/v1 |
| Authentication | Bearer Token |
| API Key | Your PromptAvenue key |
Paste the key on its own. n8n adds the Bearer prefix and appends the API route to the base URL.
3. Set up the Custom Endpoint Chat Model
- Create a workflow with a Chat Trigger connected to an AI Agent.
- Attach Custom Endpoint Chat Model to the agent's Chat Model input. Choose Custom Model Endpoint as the authentication type and select the PromptAvenue credential.
- Connect a Calculator node to the AI Agent’s Tool input.
- Under Model, use From List if your model appears, or choose By ID and enter
deepseek-v4.1-flash-uncensored. Set API Format to Chat Completions. - Set the Chat Trigger’s Response Mode to Streaming response and enable Enable Streaming on the AI Agent.
- Save the workflow. If you already use an OpenAI Chat Model with a base URL override, follow n8n's migration steps.
4. Verify the AI Agent response
Open the trigger's chat in the workflow editor. Ask the agent to use Calculator to compute 8 × 7.
Expect the chat to show 56. Open the execution to confirm that the model and Calculator ran successfully.
Common errors
| Symptom | What to check |
|---|---|
| Custom Endpoint Chat Model is missing | Check your n8n version. The node is available from 2.50.0. |
| Authentication or route error | Check the key saved in the credential, select Bearer Token, and use the /v1 base URL and Chat Completions format. |
| Model is absent from the list | Select By ID and enter the exact PromptAvenue model ID. |
| Tool-call error | Check the gateway error and verify that the chosen model supports tool calls in a streamed response. |
| Balance or rate-limit error | Check the dashboard balance if the error mentions funds. For rate limits, wait before retrying. |