Nodes/ComfyUI-PromptsO/💀Text with OpenAI
ComfyUI Node

💀Text with OpenAI

GPT text inside your workflow — the OpenAI node that keeps it simple

By S4MUEL-404·Created 11 months ago·Updated 10 months ago· 3
💀Text with OpenAI
  • images
  • text
system_prompt
user_prompt
api_key
modelgpt-4o-mini
max_tokens2048
temperature0.7
top_p0.95
seed0

💀Text with OpenAI is the most conventional node in the 💀PromptsO pack, and that's fine - it does the one thing you expect it to do. Type a system prompt, a user prompt, and an OpenAI key, and a GPT reply comes out the other end as a text string you can wire anywhere in the graph. If you already have OpenAI billing and want GPT writing your prompt variants, it's the most familiar path here.

How it works

Straightforward POST to https://api.openai.com/v1/chat/completions in standard chat format - system message, user message, stream: false. No OpenAI Python SDK involved; it's requests under the hood, same as the other API nodes in this pack. Output is a single STRING named text.

The inputs to know:

  • api_key - your OpenAI key. Empty key (or empty user prompt) is rejected up front with a clear error.
  • model - ships with gpt-4o, gpt-4o-mini (default), gpt-4-turbo, and gpt-3.5-turbo. The default is the right call: gpt-4o-mini is cheap and plenty for prompt work. Treat gpt-3.5-turbo as the legacy odd-one-out on that list.
  • images (optional) - an IMAGE input for vision. The node converts your image to base64 and sends it in OpenAI's vision format, capped at four images per batch. Nice for describing a render back into a prompt, same idea as the Gemini node's vision path.
  • max_tokens (2048), temperature (0.7), top_p (0.95), seed - the usual knobs, with the seed sent only when above zero.

The quirks, honestly

There's one genuine wart in the vision path worth knowing about: the code labels the attached image as data:image/png but actually encodes it as JPEG. Most OpenAI-compatible endpoints sniff the bytes and don't care, but if you hit an image-format error while using the images input, that mismatch is why. Feeding it a single smaller image is the practical workaround.

Then the shared family gotchas, which apply to all three API nodes here:

  • The cache ignores your API key. Responses are cached on model, prompts, sampling params, and seed - not the key. Fix a bad key and re-run with the same seed, and you'll get the old cached text. Change the seed to force a real request.
  • The key is in your workflow JSON. Widget values get embedded in the workflow, and workflows travel inside shared PNGs. Don't post a workflow with your key in it - rotate after any share.
  • Calls block the graph. Two-minute timeout on a synchronous call; a long max_tokens reply stalls the queue while it waits. Keep token budgets reasonable.

Install

One install, all six nodes:

# ComfyUI Manager: search "PromptsO", install, restart.

cd ComfyUI/custom_nodes
git clone https://github.com/S4MUEL-404/ComfyUI-PromptsO.git
pip install -r ComfyUI-PromptsO/requirements.txt

No models to download, nothing beyond requests that ComfyUI doesn't already ship. Drop in a key and you're calling GPT from inside the graph. If you're on a budget, DeepSeek undercuts it; if you want free, Gemini has a tier for that - but if you already pay OpenAI, this is the zero-friction option.

Category💀PromptsO

Inputs (9)

NameTypeDefaultDescription
system_promptSTRINGSystem instruction for the AI
user_promptSTRINGUser prompt for OpenAI
api_keySTRINGYour OpenAI API Key
modelCOMBOgpt-4o-miniChoose OpenAI model
max_tokensINT20481–32768Maximum number of tokens to generate
temperatureFLOAT0.70–2Sampling temperature (0.0 = deterministic, 2.0 = very random)
top_pFLOAT0.950–1Top-p sampling threshold
seedINT00–18446744073709550000Random seed for reproducible results
imagesoptIMAGEOptional reference images for context

Outputs (1)

NameTypeDescription
textSTRING