Eden_gpt4_node
An LLM call inside your graph β the string it returns is both the point and the trap
- STRING
Eden_gpt4_node drops a ChatGPT call right into your node graph. You type a prompt, it fires the OpenAI API, and out comes a plain string you can wire into a prompt encoder, a filename, a title - anywhere text flows. It's the simplest of Eden's three GPT nodes and the foundation the other two build on.
What it does
Under the hood it's a thin wrapper around the OpenAI chat completions API. Send prompt as the user message with a generic "You are a helpful assistant" system prompt, get back the completion. The seed input is passed through to OpenAI, so the same seed nudges toward the same output - but don't expect hard determinism, LLM sampling isn't that cooperative.
The model dropdown gives you gpt-4o and gpt-4-turbo; max_token caps the response length (default 100).
The trap: it never hard-fails
Here's the thing most people hit first. If there's no API key, the node doesn't crash - it returns a string that says "An OpenAI API key is required for GPT-4 Vision. Make sure to place a .env file in the root directory..." That string flows downstream and gets fed to your sampler as if it were a real prompt. If your output suddenly looks like an error message, check the key before you blame the model.
Setting it up
This is a network/cost node, not a model node. It needs an OpenAI account and money on it:
cd ComfyUI
# create a .env file in the ComfyUI root directory:
echo "OPENAI_API_KEY=sk-your-key-here" > .env
The pack reads that file with python-dotenv when the node first runs. Install the pack itself via ComfyUI Manager (search "Eden.art nodesuite") or git clone https://github.com/edenartlab/eden_comfy_pipelines into custom_nodes/ plus pip install -r requirements.txt.
What to wire the output into
The output is a STRING. You can't feed it straight into a CLIP Text Encode - that node wants a string on the text input, and it does accept one, but if you're on a 2026-era model your prompt is a chat-templated instruction, and this node is a great way to feed that instruction from something more than a static box. For SDXL-lineage models, an LLM-written paragraph will behave differently from tags - worth keeping in mind. You can also feed the string to an Eden_RandomPromptFromFile-style file writer, or just a text display node to eyeball it.
Costs and common issues
Every queue run is an API call you pay for. Leave max_token low if you're iterating. If you get Error:-prefixed output, read the message - it's usually an invalid key, an expired one, or a billing problem. The "no key" warning string is the single most common complaint, and it's a five-second fix once you know where the .env goes.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| max_token | INT | 1001β9223372036854776000 | β |
| model | COMBO | gpt-4o | 2 options: gpt-4o, gpt-4-turbo |
| prompt | STRING | Write a poem about ComfyUI | β |
| seed | INT | 00β9223372036854776000 | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | β |