Kimi视觉丨API
Ask an image questions — Kimi reads it for you
- image
- generated_text
- conversation_info
- total_tokens
Caption an image, describe a scene, answer "what's wrong with this face?" - and get the answer back as text your workflow can use. KimiVisionAPI is the vision half of the QING pack's Kimi integration: wire in an image and a question, and Moonshot's kimi-latest vision models look at the picture and talk back. It's the VLM-in-the-graph move from the LLM-in-comfyui playbook, done as a drop-in node.
It's from ComfyUI-QING (display name "Kimi视觉丨API"). Note that this is a paid API call, not a local model - no weights, no VRAM, but also no free lunch.
How it works
The node takes your IMAGE tensor, encodes it, and sends it to Moonshot's vision endpoint along with your text_input question. Under the hood it's the openai package talking to an OpenAI-compatible endpoint - same machinery as the pack's KimiLanguageAPI, but with an image attached. It also keeps a multi-turn conversation (default history of 8 rounds), so you can ask follow-ups about the same image across runs.
The inputs that matter:
image- the tensor it's looking at. Required.text_input- your question or instruction. Default: "请描述这张图片的内容。" (describe the content of this image).model- three context-window options:kimi-latest-8k,kimi-latest-32k(default),kimi-latest-128k. All three map to the same underlyingkimi-latestAPI model; you're really choosing how much conversation context you want to keep around the image.image_quality-auto/low/high. This controls how the image is sent upstream;lowis faster and cheaper for rough analysis,highwhen fine detail matters (reading text in the image, small objects).max_tokens,temperature,top_p,clear_history- the usual LLM dials.
The platform dropdown has a single choice (月之暗面 / Moonshot) - the vision models only ship through Moonshot's own endpoint, unlike the language node which spans four providers. That's not a bug, it's just where the models live.
Outputs: generated_text (STRING), conversation_info (STRING), and total_tokens (INT).
Where it fits
The two jobs this is genuinely good at: auto-captioning - describe a generated image and feed the description back into your prompt pipeline or a dataset - and image QA in a loop - a "did it come out right?" check that lets a workflow branch on the answer. The multi-turn history is the differentiator over a one-shot captioner: you can drill into an image ("now focus on the hands") without resending the picture and losing context.
Honest caveat: for bulk dataset captioning, a local VLM (JoyCaption, Florence-2) is free per call and uncensored; an API is better when you want frontier-quality description and don't mind the per-call cost (llm-in-comfyui makes this call for you). And remember the API is Moonshot's - it filters what it filters, and your image leaves the machine.
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. Needs the openai package (in requirements.txt) and an internet connection. Then configure your Moonshot key in Settings → QING → API configuration (or the MOONSHOT_API_KEY env var) - the key is stored locally and auto-injected at runtime.
Gotchas
The big one: no key, no call. If the node errors immediately, the key is almost always the cause - check Settings → QING first, then the console. image_quality is your cost lever: leave it auto until you specifically need high, because high-quality upstream encoding costs more tokens and adds latency. And be precise with text_input - vision models take instructions literally, so "describe the content" and "count the people and their positions" are different quality tiers of answer. Finally, remember this is a paid metered call inside a graph that may run hundreds of times - wire total_tokens into a LogPrinter if you're batching, so the spend doesn't surprise you.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | 输入要分析的图像 | |
| text_input | STRING | 请描述这张图片的内容。 | 输入要发送给Kimi视觉模型的文本问题,Kimi擅长图像理解、场景分析和视觉问答 |
| platform | COMBO | 月之暗面 | 选择API服务提供商 |
| model | COMBO | kimi-latest-32k | 选择要使用的Kimi视觉模型 📋 模型特点: 🔸 kimi-latest-8k:8K上下文版本,适合简单图像分析 🔸 kimi-latest-32k:32K上下文版本,适合复杂图像理解 🔸 kimi-latest-128k:128K上下文版本,支持超长对话和详细分析 💡 Kimi视觉模型在图像理解、文字识别、场景分析方面表现优异 |
| max_tokens | INT | 40961–32768 | 模型生成文本时最多能使用的token数量 |
| history | INT | 81–25 | 保持的历史对话轮数 |
| temperatureopt | FLOAT | 0.80–2 | 控制生成文本的随机性 |
| top_popt | FLOAT | 0.950–1 | 控制生成文本的多样性 |
| image_qualityopt | COMBO | auto | 图像处理质量:auto(自动选择), low(低质量,速度快), high(高质量,精度高) |
| clear_historyopt | BOOLEAN | false | 是否清除历史对话记录 |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| generated_text | STRING | — |
| conversation_info | STRING | — |
| total_tokens | INT | — |