π OpenAI API Runner
The Other Half of the Suite's Brain
- openai_model
- image_input
- response_text
- response_audio
- response_thoughts
The OpenAI API Runner is the sibling of the Gemini runner in this pack - same job, OpenAI's API instead of Google's. You feed it a model config, a system prompt, and a user prompt, optionally attach an image, and it returns text, an optional spoken audio track, and the model's reasoning. If Gemini is the pack's voice specialist, this is the generalist: OpenAI's model list is broader, the vision path is simple, and the TTS is a plain add-on rather than the centerpiece.
Why you'd pick this over a local LLM node: same reasoning as the Gemini side. Local models are free, offline, and uncensored, which is why the community defaults to them for prompt enhancing. You reach for an API when you want frontier-chat quality and don't need local - writing dialogue, structured rewriting, or image analysis with a top model. The pack's default, gpt-5.4-mini, is a cheap-and-fast choice that's hard to argue with for most in-graph jobs.
How it works
Required inputs: openai_model (the dict from the β¨ OpenAI Configurator), system_prompt, user_prompt - both prompts forceInput, so wire them from π LLM Dual Prompt rather than typing in the widget. Optional image_input (IMAGE) gets base64-encoded as PNG and sent as an image_url content part - that's the whole vision story, no special model tier needed as long as you avoid the o1 family.
Under the hood it's a standard Chat Completions call, with a few quirks the pack handles for you. The o1 models don't accept a system role, so the runner folds your system prompt into the user message instead; o1 also can't take images, and it'll raise if you try. When the configurator set a non-default reasoning_effort, it's passed through as a chat-completions parameter.
Outputs
- response_text (STRING) - the answer.
- response_audio (AUDIO) - present whenever TTS is enabled in the configurator and there's text to speak. It calls the
tts-1model with the voice you chose, requests raw 24 kHz PCM, and hands it back as a ComfyUI audio dict. If TTS is off, this is a silent empty dict. - response_thoughts (STRING) - OpenAI's
reasoning_contentfield, extracted for the o-series models. For plain chat models it'll be empty.
Where people get burned
- "Why is the audio silent?" - you never ticked
generate_audioon the configurator. It's a boolean there for a reason: TTS is off by default, and the runner doesn't invent it. - o1 models - no images, and system prompt gets merged into the user message, so your careful system instruction is doing less work. Fine for text; reach for gpt-4o or gpt-5.4 if you need vision.
- Long responses - TTS input is truncated to 4000 characters (the API's own limit), so a long essay's audio just stops early.
- Errors are returned as text, not exceptions - same as the Gemini side,
response_textwill start with "β OpenAI API Error" and the audio will be silent. It keeps the graph alive, but you have to read the output node.
Install & wiring
ComfyUI Manager β "Universal LLM Suite", or clone into custom_nodes:
cd ComfyUI/custom_nodes/
git clone https://github.com/alice-ai-wonder/ComfyUI-Universal-LLM-Suite
Restart; it auto-installs openai (plus google-genai and librosa) on first boot. No local weights - you need an OpenAI API key and to fund the account. Standard wire-up: Configurator β Runner β response_text into π LLM Text Display, response_audio into π LLM Audio Save & Play. It's a fresh, small pack - no real community footprint yet - and as with any node running arbitrary Python on load, a quick source read before you hand it your API key is cheap insurance.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| openai_model | OPENAI_MODEL | β | |
| system_prompt | STRING | β | |
| user_prompt | STRING | β | |
| image_inputopt | IMAGE | β |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| response_text | STRING | β |
| response_audio | AUDIO | β |
| response_thoughts | STRING | β |