kie-ai

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.

Package Information

Released: 3 mo ago
Downloads: 0 weekly / 0 monthly
Latest Version: 0.1.4

Documentation

@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

  1. 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.
  2. Add KIE.ai Chat Model as the language model of your AI Agent / chain.
  3. 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 dist

Local 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 n8n

Publish

npm login
npm publish --access public

Then 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 tools param), so AI Agent tool use works. Behavior fidelity varies per underlying model, as with any aggregator.
  • The model field in the request body is effectively ignored by KIE's gateway — the URL path decides the model. The node sets both consistently.

License

MIT

Discussion