n8n

n8n

n8n workflows and AI Agent nodes support custom OpenAI-compatible endpoints. By pointing an OpenAI credential at LivRouter, you can route automated workflows, summaries, extractions, and tool-calling agents to Claude, DeepSeek, GLM, GPT, or Qwen models from one billing account.

1. Create a LivRouter credential in n8n

  1. In n8n, open Credentials → Add Credential and search for OpenAI.
  2. Paste your LivRouter API key from the API keys page into API Key.
  3. Set Base URL to https://api.livrouter.com/v1.
  4. Save the credential (if the built-in test passes, n8n can reach https://api.livrouter.com/v1/models).

2. Use the credential in an OpenAI Chat Model or AI Agent node

  1. Add an AI Agent or Basic LLM Chain node to your workflow and attach an OpenAI Chat Model sub-node.
  2. Select your new LivRouter OpenAI credential.
  3. In the Model field, choose a fetched model or switch to By ID / Expression and enter an exact ID from the model catalog (for example deepseek-v4-flash or claude-sonnet-4-6).

Alternative: direct HTTP Request node

If your workflow calls the API directly with an HTTP Request node, send a POST request to https://api.livrouter.com/v1/chat/completions with Bearer authentication:

json
{  "model": "glm-5.3",  "messages": [    { "role": "system", "content": "Extract structured JSON." },    { "role": "user", "content": "{{ $json.text }}" }  ]}

Verify and troubleshoot

  • 401 or invalid credential: verify the LivRouter key is active and your credit balance covers workflow runs.
  • Model not in dropdown: switch the Model selector in n8n to manual ID input and paste the exact slug from the catalog.
  • Agent tool-calling errors: confirm the selected model supports tool calls and inspect failed runs in Usage logs and Errors & troubleshooting.

Read the OpenAI-compatible API guide or compare AI API pricing to estimate workflow costs per million tokens.