@miskokodi/n8n-nodes-kie-ai
v0.1.4
Published
n8n community node: KIE.ai Chat Model — use KIE's discounted LLM APIs (Gemini, GPT, Claude, DeepSeek, Grok) as a language model provider for AI Agents and chains, just like the OpenRouter node.
Maintainers
Readme
@miskokodi/n8n-nodes-kie-ai
n8n community node that adds a KIE.ai Chat Model — use KIE.ai's discounted LLM APIs (Gemini, GPT, Claude, DeepSeek, Grok) as the language model provider for AI Agent, chains, and any other LangChain root node, exactly like the built-in OpenRouter / OpenAI chat model nodes.
Why
KIE routes each LLM through its own OpenAI-compatible endpoint path
(https://api.kie.ai/{model}/v1/chat/completions) and has no /models
listing endpoint — which breaks n8n's stock OpenAI node (credential test
and model dropdown both fail). This node handles the path-based routing
internally and ships a model dropdown, so it Just Works.
Install
Self-hosted n8n → Settings → Community Nodes → Install → enter:
@miskokodi/n8n-nodes-kie-ai(Requires N8N_COMMUNITY_PACKAGES_ENABLED=true, which is the default on self-hosted.)
Use
- Create a KIE.ai API credential with your API key (kie.ai → Dashboard → API Keys). The credential test validates the key against KIE's credit endpoint.
- Add KIE.ai Chat Model as the language model of your AI Agent / chain.
- Pick a model from the dropdown, or switch the field to an expression and pass any KIE model slug directly.
Options
Temperature, top-p, penalties, max tokens, retries, timeout — same surface as the built-in OpenAI chat model node.
Network options:
- Use Relay Proxy: Route requests through your relay (for example Cloudflare Worker) to avoid datacenter IP blocks.
- Relay Base URL: Relay template (recommended:
https://your-relay.workers.dev/{model}/v1). - Base URL Override: Advanced direct-gateway override (ignored when relay is enabled).
Model list
KIE has no public models-list API, so the dropdown is a curated list in
nodes/LmChatKieAi/LmChatKieAi.node.ts (KIE_MODELS). PRs welcome when
KIE adds/renames models; the dropdown is wired through loadOptions, so a
remote fetch can be dropped in later without a schema change.
Development
npm install
npm run build # tsc + copy icon to distLocal testing without publishing:
# in this repo
npm run build && npm pack # produces miskokodi-n8n-nodes-kie-ai-0.1.2.tgz
# on your n8n host
cd ~/.n8n/nodes # create if missing
npm install /path/to/miskokodi-n8n-nodes-kie-ai-0.1.2.tgz
# restart n8nPublish
npm login
npm publish --access publicThen optionally submit for n8n's verified community node listing: https://docs.n8n.io/integrations/creating-nodes/deploy/submit-community-nodes/
Notes
- Function calling / tools are supported (KIE's chat endpoints accept the standard
toolsparam), so AI Agent tool use works. Behavior fidelity varies per underlying model, as with any aggregator. - The
modelfield in the request body is effectively ignored by KIE's gateway — the URL path decides the model. The node sets both consistently.
License
MIT
