Hosted LLM API (Secure)
Generate prompts with ChatGPT or DeepSeek when local models aren't enough
- text
Local GGUF models are great until the task needs a bigger brain. PromptGenerateAPI is the pack's escape hatch: instead of loading a model into your VRAM, it calls a hosted LLM - ChatGPT or DeepSeek - to write your prompts. No local weights, no llama-cpp-python, no VRAM cost. The trade is an API key and a network call, but for hard prompt-writing jobs the frontier models earn their keep.
What it is
It's the API-backed member of the pack's prompt-generation family. The README points at DeepSeek specifically because platform.deepseek.com hands out 10M free tokens, which is a genuinely great way to try this node for nothing. It doubles as a simple chat node - there's an explicit toggle for that - so you're not locked into prompt generation if you just want to ask questions.
The inputs that matter
- model_name - dropdown. ChatGPT-3.5, ChatGPT-4, DeepSeek, plus the raw model IDs (gpt-3.5-turbo, gpt-4-0613, gpt-4-1106-preview, glm-4, and friends). Pick the provider, then the model.
- api_key - your key for the chosen provider. This is a multiline STRING; paste it in. Keep it to the model you actually selected - a DeepSeek key won't work on a ChatGPT model and vice versa.
- chat_type - BOOLEAN, default true. True = Prompt Generator mode; false = Simple Chat. The toggle that decides whether you get a crafted prompt or a conversational answer.
- description - context for the prompt generator. Describe the image, the style, the vibe you're after; this is what the API turns into a prompt.
- question - your actual request. In chat mode this is just the message; in prompt mode it's the instruction.
- context_size - how much conversation context to keep, default 5. The README frames this as a memory knob; more context means the model remembers more of the exchange.
- seed - for reproducible outputs where the API supports it.
Output is a single STRING.
How it works
Under the hood it's an OpenAI-compatible API call - the same wire format regardless of whether you're talking to OpenAI or DeepSeek. Your description and question get packaged up, sent off, and the returned text comes back as a STRING you can wire straight into a CLIP Text Encode or a text display.
Install
Just the pack, nothing else:
cd ComfyUI/custom_nodes
git clone https://github.com/gokayfem/ComfyUI_VLM_nodes
Restart ComfyUI (or Manager → "VLM Nodes"). No llama-cpp-python needed for this node - that's the whole appeal - and Python 3.9+ still applies.
Gotchas
The failure modes here are API-shaped, not GPU-shaped. Wrong or missing key → auth error; check the provider matches the model_name. No network → timeout; it's a hosted call, so ComfyUI needs internet. And a real heads-up: this node sends your description and question to a third party. If you're captioning or referencing images with sensitive content, the local models are the privacy-respecting option - that's a legit reason to reach for LLMSampler instead.
Inputs (19)
| Name | Type | Default | Description |
|---|---|---|---|
| model_name | COMBO | OpenAI — GPT-5.6 Sol | 37 options: OpenAI — GPT-5.6 Terra, OpenAI — GPT-5.6 Sol, OpenAI — GPT-5.6 Luna, Google — Gemini 3.6 Flash, Google — Gemini 3.5 Flash, Google — Gemini 3.5 Flash-Lite, +31 |
| chat_type | BOOLEAN | true | — |
| credential_source | COMBO | Provider environment variable | Keys stay in the ComfyUI server environment and are never serialized into the workflow. |
| description | STRING | — | |
| question | STRING | — | |
| context_size | INT | 00–30 | Legacy slot retained for workflow compatibility. Hosted calls are stateless for privacy. |
| seed | INT | 00–18446744073709550000 | — |
| base_urlopt | STRING | Custom / Local only. Remote URLs require HTTPS; HTTP is allowed only for loopback. | |
| model_overrideopt | STRING | Exact provider model ID. Overrides the preset. | |
| api_modeopt | COMBO | Auto | 3 options: Auto, Responses, Chat Completions |
| timeout_secondsopt | FLOAT | 120.001–1800 | — |
| reasoning_effortopt | COMBO | none | 7 options: none, minimal, low, medium, high, xhigh, +1 |
| max_output_tokensopt | INT | 40961–131072 | — |
| web_searchopt | BOOLEAN | false | Enable the provider's native/server-side web search. Search calls may have additional cost and data terms. |
| output_formatopt | COMBO | Text | JSON modes are parsed and validated locally before the node succeeds. |
| json_schemaopt | STRING | JSON Schema object used when output_format is JSON Schema. | |
| schema_api_styleopt | COMBO | Auto (provider native) | Custom / Local compatibility override. llama.cpp uses a different response_format schema shape. |
| stream_outputopt | BOOLEAN | true | — |
| use_system_proxyopt | BOOLEAN | false | Opt in to HTTP(S)_PROXY from the server environment. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |