ComfyUI Node
OpenAI Compatible LLM
Talk to any OpenAI-compatible endpoint (OpenAI, OpenRouter, Groq, LM Studio, Ollama, vLLM, ...). Enter the base URL and API key, press 'Refresh models' to load the model list, then connect as many text inputs as you need.
OpenAI Compatible LLM
- prompts
- images
- video
- text
◄base_urlhttps://api.openai.com/v1►
◄api_key►
◄model(press Refresh models)►
◄system_prompt►
◄input_modejoin►
◄separator\n\n►
◄temperature1.00►
◄max_tokens0►
◄timeout180►
◄seed0►
◄reuse_last_resultfalse►
◄image_detailauto►
◄image_formatjpeg►
◄image_max_side0►
◄video_max_mb20►
Categoryapi/text
Inputs (18)
| Name | Type | Default | Description |
|---|---|---|---|
| base_url | STRING | https://api.openai.com/v1 | Endpoint root, i.e. the part before /models and /chat/completions. |
| api_key | STRING | API key. Careful: it is saved inside the workflow. Leave empty to use the OPENAI_COMPATIBLE_API_KEY / OPENAI_API_KEY environment variable, or type 'env:MY_VARIABLE' to read a specific one. | |
| model | COMBO | (press Refresh models) | Filled by the 'Refresh models' button from GET {base_url}/models. |
| prompts | COMFY_AUTOGROW_V3 | Text inputs that make up the prompt. A new slot appears every time you connect one, up to 16. Empty inputs are skipped. | |
| system_promptopt | STRING | Optional instructions sent as the system message. | |
| input_modeopt | COMBO | join | join: glue all text inputs into a single user message. separate_messages: send each text input as its own user message. |
| separatoropt | STRING | \n\n | Used by 'join' mode. \n and \t are turned into real newlines/tabs. |
| temperatureopt | FLOAT | 1.00-1–2 | Sampling temperature. Set to -1 to leave it out of the request. |
| max_tokensopt | INT | 00–1000000 | Maximum tokens in the answer. 0 leaves it up to the provider. |
| timeoutopt | INT | 1805–3600 | Seconds to wait for the response. |
| seedopt | INT | 00–18446744073709550000 | Not sent to the API: it only controls whether this node re-runs instead of returning its cached answer. |
| reuse_last_resultopt | BOOLEAN | false | On: output the answer this node produced last time and do not call the API at all, no matter what changed upstream. Off: generate normally. The stored answer survives restarts; if there is nothing stored yet, one answer is generated and kept. |
| imagesopt | IMAGE | Optional image(s) to look at. Every frame of the batch is sent as its own image, attached to the last user message. Needs a vision-capable model. | |
| videoopt | VIDEO | Optional video, inlined as a video_url block. Support is provider-specific and size limits are usually low; most models reject it. | |
| image_detailopt | COMBO | auto | OpenAI 'detail' hint. 'low' is much cheaper, 'high' reads fine print. |
| image_formatopt | COMBO | jpeg | How images are encoded. png is lossless (better for text/UI screenshots). |
| image_max_sideopt | INT | 00–8192 | Downscale images so the longest side is at most this many pixels, to save tokens and upload time. 0 sends them at full size. |
| video_max_mbopt | INT | 201–500 | Refuse to upload a video larger than this, instead of failing at the provider. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |