Nodes/VLM_nodes/Hosted LLM API (Secure)
ComfyUI Node Runs on cloud

Hosted LLM API (Secure)

Generate prompts with ChatGPT or DeepSeek when local models aren't enough

By gokayfem·Created 3 years ago·Updated 2 months ago· 589
Hosted LLM API (Secure)
    • text
    ◄model_nameOpenAI — GPT-5.6 Sol►
    ◄chat_typetrue►
    ◄credential_sourceProvider environment variable►
    ◄description►
    ◄question►
    ◄context_size0►
    ◄seed0►
    ◄base_url►
    ◄model_override►
    ◄api_modeAuto►
    ◄timeout_seconds120.00►
    ◄reasoning_effortnone►
    ◄max_output_tokens4096►
    ◄web_searchfalse►
    ◄output_formatText►
    ◄json_schema►
    ◄schema_api_styleAuto (provider native)►
    ◄stream_outputtrue►
    ◄use_system_proxyfalse►

    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.

    CategoryVLM Nodes/API

    Inputs (19)

    NameTypeDefaultDescription
    model_nameCOMBOOpenAI — GPT-5.6 Sol37 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_typeBOOLEANtrue—
    credential_sourceCOMBOProvider environment variableKeys stay in the ComfyUI server environment and are never serialized into the workflow.
    descriptionSTRING—
    questionSTRING—
    context_sizeINT00–30Legacy slot retained for workflow compatibility. Hosted calls are stateless for privacy.
    seedINT00–18446744073709550000—
    base_urloptSTRINGCustom / Local only. Remote URLs require HTTPS; HTTP is allowed only for loopback.
    model_overrideoptSTRINGExact provider model ID. Overrides the preset.
    api_modeoptCOMBOAuto3 options: Auto, Responses, Chat Completions
    timeout_secondsoptFLOAT120.001–1800—
    reasoning_effortoptCOMBOnone7 options: none, minimal, low, medium, high, xhigh, +1
    max_output_tokensoptINT40961–131072—
    web_searchoptBOOLEANfalseEnable the provider's native/server-side web search. Search calls may have additional cost and data terms.
    output_formatoptCOMBOTextJSON modes are parsed and validated locally before the node succeeds.
    json_schemaoptSTRINGJSON Schema object used when output_format is JSON Schema.
    schema_api_styleoptCOMBOAuto (provider native)Custom / Local compatibility override. llama.cpp uses a different response_format schema shape.
    stream_outputoptBOOLEANtrue—
    use_system_proxyoptBOOLEANfalseOpt in to HTTP(S)_PROXY from the server environment.

    Outputs (1)

    NameTypeDescription
    textSTRING—