Nodes/ComfyUI-QING/Kimi语言丨API
ComfyUI Node

Kimi语言丨API

Drop Moonshot's Kimi into your graph — long context, real work done

By sheengoa·Created about a year ago·Updated 19 days ago· 16
Kimi语言丨API
    • generated_text
    • conversation_info
    • total_tokens
    text_input请帮我分析一下这个问题,并提供详细的解决方案。
    platform月之暗面
    modelkimi-k2-0711
    max_tokens4096
    history12
    temperature0.8
    top_p0.95
    repetition_penalty1.10
    clear_historyfalse

    You've got a workflow that needs a brain - rewriting a rough idea into a structured prompt, analyzing a long document, generating tags - and you don't want to run an 8B model on your own card. That's what KimiLanguageAPI is: a node that calls Moonshot AI's Kimi models (the same kimi-k2 series people actually run in the community for long-context work) over the API and drops the answer back into your graph as text. It's the API path of the LLM-in-the-graph pattern, and it handles the fiddly bits - keys, base URLs, multi-turn history - so you don't have to.

    It's from ComfyUI-QING (display name "Kimi语言丨API"), the Chinese-authored pack that bundles 19 API nodes covering Kimi, GLM, Qwen, DeepSeek, Gemini and more.

    How it works

    This is a network node, not a local model - it needs an API key and an internet connection, and it uses the openai Python package under the hood against OpenAI-compatible endpoints. The interesting part is the platform dropdown: 月之暗面 (Moonshot), 火山引擎 (Volcano Engine), 阿里云百炼 (Alibaba DashScope), or 硅基流动 (SiliconFlow). Same Kimi models, four different providers' endpoints, each with its own key - pick the one you have an account with. The node maps its friendly model names to each platform's actual API IDs (so "kimi-k2-0905" becomes kimi-k2-0905-preview on Moonshot, kimi-k2-250905 on Volcano, and so on), which you'd otherwise have to look up by hand.

    Key config is done once in ComfyUI Settings → QING → API configuration (stored locally, not in your workflow file), with an environment-variable fallback (MOONSHOT_API_KEY, etc.) if you prefer. Keys never sit in the workflow JSON - which, given this is a node that reaches the network by design, is the security hygiene you want (external-api-nodes has the full frame on why).

    The inputs that matter:

    • text_input - your prompt, multiline.
    • platform + model - which provider and which Kimi. kimi-k2-0905 is the long-context one (2M-char context, per the node's own tooltip - genuinely absurd for document analysis), kimi-k2-turbo is the fast/cheap option, kimi-k2-0711 the middle.
    • max_tokens - output cap, default 4096.
    • history - how many previous turns to keep in the conversation (default 12), so you can have an actual back-and-forth across runs instead of stateless one-shots.
    • Optional: temperature, top_p, repetition_penalty, and clear_history to reset the conversation.

    Outputs: generated_text (STRING - what you actually want), conversation_info (STRING), and total_tokens (INT) so you can watch your spend.

    The honest take

    Kimi's genuine strength is long-document work - shove a large text in and get analysis back. For the classic "rewrite my idea into a structured prompt" job it works fine, though an API call has real costs and latency for what a local model does free (llm-in-comfyui makes the local-vs-API case). Where this node wins is convenience: no VRAM, no quantized weights, no Ollama server, and multi-turn history built in. If you already have a Moonshot or SiliconFlow key, it's the fastest brain-in-a-graph you'll get.

    Installing

    Part of ComfyUI-QING. ComfyUI Manager: search "ComfyUI-QING". Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/GAO-SHIQING/ComfyUI-QING
    cd ComfyUI-QING
    python install_dependencies.py   # or: pip install -r requirements.txt
    

    Restart ComfyUI. The openai package (in requirements.txt) is the only hard dependency this node needs beyond the shared ones. No model downloads. Then: get a key, put it in Settings → QING, restart.

    Gotchas

    No key configured → the node fails with an API-key error, so configure Settings first. This is a paid API - total_tokens is there so you can actually see what each run costs. The model dropdown shows friendly names, not literal API IDs; don't go looking for kimi-k2-0905-preview in your provider's docs and panic - that mapping is the node's job. And remember the two security rules that apply to every API node: your prompt text leaves your machine to the provider, and you should know exactly what this node does before running it (external-api-nodes covers the "node that phones home by design" caution in detail).

    CategoryQING/API

    Inputs (9)

    NameTypeDefaultDescription
    text_inputSTRING请帮我分析一下这个问题,并提供详细的解决方案。输入要发送给Kimi模型的文本内容,Kimi擅长长文档分析、联网搜索和复杂推理
    platformCOMBO月之暗面选择API服务提供商
    modelCOMBOkimi-k2-0711选择要使用的Kimi模型 📋 模型特点: 🔸 kimi-k2-0905:最新版本,200万字超长上下文,擅长长文档分析和复杂推理 🔸 kimi-k2-0711:稳定版本,平衡性能和成本 🔸 kimi-k2-turbo:快速响应版本,适合简单对话 💡 Kimi模型具备联网搜索能力,特别适合需要实时信息的任务
    max_tokensINT40961–32768模型生成文本时最多能使用的token数量
    historyINT121–40保持的历史对话轮数
    temperatureoptFLOAT0.80–2控制生成文本的随机性
    top_poptFLOAT0.950–1控制生成文本的多样性
    repetition_penaltyoptFLOAT1.101–1.3控制重复文本的惩罚程度
    clear_historyoptBOOLEANfalse是否清除历史对话记录

    Outputs (3)

    NameTypeDescription
    generated_textSTRING
    conversation_infoSTRING
    total_tokensINT