STOP WASTING PAID TOKENS. START POOLING ACCOUNTS TODAY. [ GET YOUR VAULT ]

Connect n8n to SpiderGate

Who this is for: anyone building n8n workflows who wants their AI nodes to call models through SpiderGate.

What this does: walks you through an n8n OpenAI credential with SpiderGate's Base URL, and the one node setting SpiderGate needs.

Before you begin

  • n8n, self-hosted or n8n Cloud.

  • Permission to mint agent tokens for your brand in SpiderGate.

  • About 5 minutes.

Warning: If the model you name is one of your own routing aliases backed by a coding-plan key (Z.ai, Alibaba Qwen, BytePlus, MiniMax), automated traffic from this tool can break that provider's plan terms. Back any alias an automation calls with pay-as-you-go keys.

Steps

Step 1 — Mint an agent token

In SpiderGate, open Keys (/dashboard/gate/keys) and choose Connect an agent. Name it after the tool, set its limits, and create it. Copy the token now: SpiderGate shows it exactly once. See Agent Keys for budgets and scopes; the tool needs gate:chat and gate:models, which new tokens have by default.

Agent tokens expire, by default after 30 days. Note the date, and mint a new one before then.

Step 2 — Create the credential

In n8n, create a credential of type OpenAI and fill in:

  • API Key — your SpiderGate token.

  • Organization ID (optional) — leave empty.

  • Base URL — https://spideriq.ai/api/gate/v1, with no trailing slash. n8n works out the models address from this value.

Save it. n8n tests the credential by calling https://spideriq.ai/api/gate/v1/models, which SpiderGate answers.

Step 3 — Configure the OpenAI Chat Model node

In your AI Agent or LLM chain, add an OpenAI Chat Model sub-node and pick the credential from Step 2. Then:

  • Model — choose From List (it shows what SpiderGate's /models returns) or ID and type an alias such as spideriq/coding.

  • Use Responses API — turn it off. On node version 1.3 it is on by default, and SpiderGate serves Chat Completions, not the Responses API.

The node's built-in tools (Web Search, File Search, Code Interpreter) need the Responses API, so they are not available through SpiderGate. Options such as temperature, maximum tokens and timeout work either way.

Verify it worked

Run the workflow once. Open Traces in the SpiderGate dashboard (Traces). Your request appears under the agent token you minted, with the model that served it.

Troubleshoot

The credential test fails. Check the Base URL has no trailing slash and the token has not expired.

The node errors on every run. Use Responses API is still on. Turn it off.

Tool calls behave oddly. n8n warns that with a Base URL override "not all models might be chat-compatible or support other features, like tools calling or JSON response format". Pick a model that supports tools.

Related