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.

Model pricing · Run the API quickstart

Markdown

  • A PromptAvenue account with API balance.
  • n8n 2.50.0 or later with access to the workflow editor and credential creation.

In the PromptAvenue dashboard, open the API keys page and select Create API key. Copy the full key when it appears.

Create a Custom Model Endpoint credential named PromptAvenue.

FieldValue
Base URLhttps://api.promptavenue.com/v1
AuthenticationBearer Token
API KeyYour PromptAvenue key

Paste the key on its own. n8n adds the Bearer prefix and appends the API route to the base URL.

  1. Create a workflow with a Chat Trigger connected to an AI Agent.
  2. 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.
  3. Connect a Calculator node to the AI Agent’s Tool input.
  4. 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.
  5. Set the Chat Trigger’s Response Mode to Streaming response and enable Enable Streaming on the AI Agent.
  6. Save the workflow. If you already use an OpenAI Chat Model with a base URL override, follow n8n's migration steps.

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.

SymptomWhat to check
Custom Endpoint Chat Model is missingCheck your n8n version. The node is available from 2.50.0.
Authentication or route errorCheck the key saved in the credential, select Bearer Token, and use the /v1 base URL and Chat Completions format.
Model is absent from the listSelect By ID and enter the exact PromptAvenue model ID.
Tool-call errorCheck the gateway error and verify that the chosen model supports tool calls in a streamed response.
Balance or rate-limit errorCheck the dashboard balance if the error mentions funds. For rate limits, wait before retrying.