Nodes/SpicyAPI/SpicyAPI Chat
ComfyUI Node

SpicyAPI Chat

25 text models in one node, writing your prompts for you

By spicyapi-ai·Created 21 days ago·Updated 2 days ago· 2
SpicyAPI Chat
  • images
  • text
◄modelgoogle/gemini-3.7-flash/chat►
◄prompt►
◄system►
◄max_tokens2048►
◄temperature-1.00►
◄seed0►

The most useful node in the pack, and the one nobody searches for. It takes a prompt, a system instruction and optionally some images, sends them to one of 25 hosted text models, and hands the answer back as a STRING you can wire into any prompt field in ComfyUI.

That's the trick: an LLM sitting inside the graph. Write a rough idea, have a chat model expand it into the kind of dense prompt a diffusion model actually wants, feed the string straight into the image node next door, and run. Same graph generates a different picture each time because the prompt is new each time. You can also invert it - feed a generated image back in and ask for a caption or a variation prompt.

What's happening

The node builds a chat completion request: your prompt as a user message, system as a system message if you wrote one, and any images as image content blocks after an upload. Then it posts the whole thing to SpicyAPI and returns the assistant's reply as text. Two detail-level behaviours from the pack worth knowing: temperature is omitted from the request entirely at its default of -1, so the model's own default applies, and the image_* sockets only get sent if you actually connected something.

One honest caveat: image-reading is per-model. Point an image at a model that can't see, and the request is refused with nothing charged - which is the right behaviour, if an annoying one to debug if you didn't know the model couldn't do it.

Inputs

  • model - a combo of 25 text models, defaulting to google/gemini-3.7-flash/chat, which is a fast, cheap, image-capable pick. Bigger reasoning models are in the same list when a task needs them.
  • prompt - your message. For prompt-writing, ask for what you want back ("write one paragraph describing this scene for an image model") rather than chatting.
  • system - optional instructions for the model. This is where you put the house style: no lists, one paragraph, front-load the subject.
  • max_tokens - 1 to 200,000, default 2048, and it caps the answer including reasoning tokens. Thinking-heavy models can eat that budget and hand you a truncated answer, so raise it if replies keep cutting off.
  • temperature - −1 to 2, default −1 which leaves it to the model. Push it up for variety, down for repeatable prompt-formatting work.
  • seed - changing it asks again; the model may still give the same answer. Fixed by default so a re-queue doesn't ping the API a second time.
  • images (optional) - growing sockets for up to eight images, each of which can itself be a batch.

Output: text, a STRING. Wire it into a prompt input on any image or video node, into a save-text node, or into another Chat node if you want a second pass.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/spicyapi-ai/comfyui-spicyapi

Restart. Settings > SpicyAPI → paste a key from spicyapi.ai/console/keys, or set SPICY_API_KEY in the environment. Restart once more so the node list comes from your account. ComfyUI Manager: search SpicyAPI. No dependencies, no local model - that's the point, and it means this works on a machine that has never run an LLM in its life.

The one thing to watch

Caching, not money. The pack defaults control after generate to fixed everywhere because runs are billed, and for a Chat node that's actively unhelpful: re-queueing returns the cached text, so if you're using Chat to generate a fresh prompt each run, set control after generate to randomize on the seed or your images will come out suspiciously identical. Cost per call is small - text models are the cheapest thing in the pack - but set Settings > SpicyAPI > Max cost per run anyway if a long max_tokens and a chatty graph are in play.

Errors are the pack-wide set: No SpicyAPI key is set, 40310 for an unverified email, 40004 when the chosen model and inputs aren't a served combination (typically an image sent to a model that can't read one - nothing charged), and request_id ... messages that support will want verbatim.

CategorySpicyAPI/Text

Inputs (7)

NameTypeDefaultDescription
modelCOMBOgoogle/gemini-3.7-flash/chat25 options: anthropic/claude-sonnet-5.5/chat, anthropic/claude-opus-5.5/chat, xai/grok-4.7/chat, deepseek/v4.1-flash/chat, zai/glm-5.3-flash/chat, zai/glm-5.3/chat, +19
promptSTRING—
systemSTRINGOptional instructions for the model.
max_tokensINT20481–200000Upper bound on the answer length, reasoning included.
temperatureFLOAT-1.00-1–2-1 leaves it to the model.
seedINT00–2147483647Changing it asks again; the model may still answer the same way.
imagesoptCOMFY_AUTOGROW_V3—

Outputs (1)

NameTypeDescription
textSTRING—