n8n with an OpenAI-compatible API: Claude, GPT, Gemini

Point n8n's OpenAI credential at one base URL and use Claude, GPT, Gemini and open models in AI Agent workflows. Setup, model picks and fixes for common errors.

Checked 2026-11-21

·All guides·Models

In n8n, open the OpenAI credential, set Base URL to https://api.uplinkswitch.com/v1, and paste your sk-uplink-live-… key. The OpenAI Chat Model node then lists every UplinkSwitch chat model, including claude-sonnet-5-5 and gemini-4-argon, for AI Agent and chain workflows.

Set up the credential

  1. Credentials → New → OpenAI.
  2. API Key: your UplinkSwitch key.
  3. Base URL: https://api.uplinkswitch.com/v1. Stop at /v1; n8n adds the rest.
  4. Save. n8n checks the credential by listing models, so a saved credential means the key works.

The OpenAI Chat Model sub-node can also take a Base URL under Options; when both are set, the node's value wins.

Pick a model per workflow

WorkflowModel idPrice per 1M (in / out)
Classifying and routing incoming messagesclaude-haiku-5-5$0.0582 / $0.1455
AI Agent with tools (HTTP, Sheets, CRM)claude-sonnet-5-5$1.164 / $2.91
Summarising long documentsgemini-4-argon$0.582 / $2.91

Because the base URL isn't OpenAI's, n8n shows the full model list, not just GPT names. Type or pick the exact catalog id.

When something goes wrong

  • 404 on every call: the Base URL includes /chat/completions. Cut it back to https://api.uplinkswitch.com/v1.
  • Agent ignores its tools: n8n warns that non-OpenAI models may not support tool calling. Switch the agent to a model that lists tools, such as claude-sonnet-5-5 or gpt-6.1-sol.
  • The chat model fails but an HTTP Request node works: turn streaming off in the node options and update n8n; forum reports tie this to some n8n versions.
  • 402: the balance ran out; top up and the workflow resumes on the next run.

Questions and answers

Yes. With the credential above, claude-sonnet-5-5 and the other Claude ids work through the OpenAI Chat Model node, billed from your UplinkSwitch balance.

No. One credential covers every model; each node picks its own model id.

Make a key just for n8n and give it a spend limit in the console. When it's reached, calls stop instead of running up the bill.
Join on Telegram
Help