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
- In n8n, open Credentials → Add Credential and search for OpenAI.
- Paste your LivRouter API key from the API keys page into API Key.
- Set Base URL to
https://api.livrouter.com/v1. - 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
- Add an AI Agent or Basic LLM Chain node to your workflow and attach an OpenAI Chat Model sub-node.
- Select your new LivRouter OpenAI credential.
- 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-flashorclaude-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:
{ "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.