n8n
Use GreenPT models in n8n AI agents and chains through the OpenAI Chat Model node.
n8n is a workflow automation platform with built-in AI agent nodes. Its OpenAI Chat Model node accepts a custom base URL, so it can run any GreenPT chat model.
Prerequisites
- An n8n instance, on n8n Cloud or self-hosted
- A GreenPT API key from your GreenPT dashboard
Create the credential
- In n8n, open Credentials and add an OpenAI credential.
- Fill in the fields:
| Field | Value |
|---|---|
| API Key | Your GreenPT API key |
| Organization ID (optional) | Leave empty |
| Base URL | https://api.greenpt.ai/v1 |
- Save. n8n tests the connection by listing your models.
To keep requests in the US region, use https://api.us.greenpt.ai/v1 as the
Base URL. See Regions.
Add the model to an agent
- Add an AI Agent (or Basic LLM Chain) node to your workflow.
- Click the Chat Model input and choose OpenAI Chat Model.
- Select the GreenPT credential.
- Under Model, choose By ID and enter
glm-5.3, or another chat model from the model cards. - Turn off Use Responses API.
Turn off Use Responses API
The OpenAI Chat Model node sends requests to the Responses API by default. GreenPT serves the Chat Completions API, so with the toggle on, every run fails with "The resource you are requesting could not be found".
The From list option shows every model on your account, including embedding and reranking models. Pick a chat model; the others cannot answer chat requests.
Tool calling
AI Agent tools work with GreenPT chat models: the agent sends tool calls through the Chat Completions API and passes the tool results back to the model.
Verify the connection
Check the key and Base URL outside n8n:
curl https://api.greenpt.ai/v1/models \
-H "Authorization: Bearer YOUR_GREENPT_KEY"Troubleshooting
| Symptom | Fix |
|---|---|
| "The resource you are requesting could not be found" | Turn off Use Responses API on the OpenAI Chat Model node |
| 401 Unauthorized | Use a GreenPT API key with the GreenPT Base URL |
| 400 Unsupported model | Use an ID from /v1/models exactly, including case |
| Empty reply from a reasoning model | Raise Maximum Number of Tokens: reasoning uses part of the budget before the visible answer |