๐พ OpenAI Chat API ๐
OmixChatPro and the history trap nobody mentions
- last_reply
- chat_history
You've got an LLM-encoded model like Z-Image or Flux 2 Klein where your prompt is read like an instruction, and you keep hand-polishing the same paragraph between generations. OmixChatPro ("๐พ OpenAI Chat API ๐") is the node that lets GPT answer back inside the graph: type a request, it calls OpenAI, and hands you the reply as a string you can wire anywhere a text value goes. It's part of OmiXDev, a small pack by Omid Ameri (Omix.IR) that mostly exists for its three chat nodes. Nothing here will change your life, but if you want cheap GPT in a workflow, it's a working option.
How it works
Under the hood it's a single openai client call. You feed a user_message, it hits chat.completions.create with the model you picked, and returns the reply text. No system prompt, no tooling, nothing fancy.
Here's the part that bites: despite the send_history toggle and the README's "supports chat history" claim, this node never actually sends your conversation to the model. I read the source - the send_history parameter is accepted and then never used. Every call is a fresh, stateless single message. The chat_history output is just a growing text log of the conversation (lines prefixed ๐ค and ๐ค) for display or saving, not for context. If you want a node that genuinely carries a conversation, the pack's Ollama and Gemini siblings do that. This one doesn't.
The inputs and outputs that matter
The three you'll actually touch:
api_key- paste your OpenAI key. It lands in the workflow JSON, so don't share workflows with your key in them.user_message- the thing you want GPT to do, e.g. "rewrite this as a detailed prompt for a full-body portrait: ..."model- a hardcoded dropdown:gpt-4.1-mini(default),gpt-4.1,gpt-4o-mini. You can't type your own.
reset clears the in-memory history; send_history exists but does nothing here, as covered.
Both outputs are plain STRINGs: last_reply and chat_history. Wire last_reply into a Show Text / preview node, or straight into a CLIP text encode if you want to generate off what GPT wrote - that's the real use case. The author's own example workflow routes chat_history into Easy-Use's "showAnything" to watch the log.
Installing OmiXDev
ComfyUI Manager: search OmiXdev Custom Nodes (or install from GitHub URL) and paste https://github.com/omixmaxdimo/OmiXDev. Or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/omixmaxdimo/OmiXDev.git
cd OmiXDev
pip install -r requirements.txt
Then restart ComfyUI. The requirements file pulls openai>=1.0.0 plus the SDKs the other two chat nodes need. No model downloads, nothing heavy.
Gotchas
- Shared history.
chat_historyis a class-level list, so every OmixChatPro in your whole session shares one log - two workflows running at once pollute each other. It also dies on restart. - Errors come back as text. A bad key or a timeout doesn't throw; it returns "โ Error: ..." as
last_reply. Feed that into a prompt encoder and you'll silently generate off the error message. Keep a preview node on the output. - Cost is real but small. gpt-4.1-mini is cheap per token; gpt-4.1 is the bigger ticket. For prompt-writing you almost never need the big one.
The ecosystem lesson from the KB is worth repeating: custom nodes run arbitrary Python with no sandbox, so install small packs like this from GitHub rather than sketchy mirrors. Beyond that - it's a fine, honest little node. Just don't expect it to remember anything.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| api_key | STRING | โ | |
| user_message | STRING | Hello! | โ |
| model | COMBO | gpt-4.1-mini | 3 options: gpt-4.1-mini, gpt-4.1, gpt-4o-mini |
| resetopt | BOOLEAN | false | โ |
| send_historyopt | BOOLEAN | true | โ |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| last_reply | STRING | โ |
| chat_history | STRING | โ |