GreenPT Docs
Automation platforms

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

  1. In n8n, open Credentials and add an OpenAI credential.
  2. Fill in the fields:
FieldValue
API KeyYour GreenPT API key
Organization ID (optional)Leave empty
Base URLhttps://api.greenpt.ai/v1
  1. 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

  1. Add an AI Agent (or Basic LLM Chain) node to your workflow.
  2. Click the Chat Model input and choose OpenAI Chat Model.
  3. Select the GreenPT credential.
  4. Under Model, choose By ID and enter glm-5.3, or another chat model from the model cards.
  5. 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

SymptomFix
"The resource you are requesting could not be found"Turn off Use Responses API on the OpenAI Chat Model node
401 UnauthorizedUse a GreenPT API key with the GreenPT Base URL
400 Unsupported modelUse an ID from /v1/models exactly, including case
Empty reply from a reasoning modelRaise Maximum Number of Tokens: reasoning uses part of the budget before the visible answer

On this page