💬 Polza Chat
Polza Chat puts GPT-4o, Claude and Gemini inside your graph
- text
- reasoning
- cost_rub
- total_tokens
Most LLM nodes in ComfyUI want you to download weights and hand over some VRAM. Polza Chat goes the other way: it's a thin client for Polza.ai, an API aggregator that fronts 300+ chat models behind a single key. GPT-4o, Claude Sonnet, Gemini, DeepSeek, reasoning models like o1 and R1 - they're all a dropdown away, and none of them touch your GPU. The name is the point: this node doesn't run anything. It rents.
Why reach for it? The standard job is prompt enhancement - the LLM-in-the-graph pattern where a rough idea gets rewritten into a structured, model-appropriate prompt before it hits your encoder. Polza Chat is that, but hosted: you get genuine frontier-chat quality without owning the hardware or babysitting an Ollama server. It's also the natural front half of a chain - ask it to write an image description, feed the text output into Polza Text-to-Image, and you've built a tiny text-to-image pipeline out of two nodes.
How it works
The node builds a standard chat-completions payload and POSTs it to /v1/chat/completions on Polza's API. No streaming, no local model - just HTTP and an API key. Two details are worth knowing before you use it:
- The model dropdown starts at "Click Load models." The pack deliberately refuses to phone home during ComfyUI startup (set
POLZA_FETCH_MODELS_ON_STARTUP=1if you want it to). Instead, a "Load models" button on the node fetches the live model list from the/polza/modelsendpoint - which needs your API key set first. That trips people up on first install: no key, no list. - It always re-runs.
IS_CHANGEDreturnsnan, so every time you hit Queue, the node calls the API again - even if nothing changed. On a per-call metered service that's a quiet way to burn money. Rerunning a workflow is rerunning a purchase.
The inputs that matter
- model - pick from the loaded list (default
openai/gpt-4o). This is the one input you actually shop around in. - prompt - your user message. Required.
- system_prompt - optional role=system instruction; the obvious place for "you are a prompt engineer…".
- reasoning_effort -
none/minimal/low/medium/high/xhigh, for reasoning models. Set tonone(the default) and it sends nothing; anything else sends areasoningeffort param. - response_format -
textorjson_object. JSON mode is handy when the output feeds downstream automation, but treat the model's JSON as untrustworthy without validation.
The rest - temperature, max_tokens, top_p, the two penalties, seed - are standard chat knobs you can leave alone.
Outputs
Four: text (the reply, wires into any STRING slot), reasoning (chain-of-thought, when the model produces it), cost_rub (what the call cost, in rubles - Polza is a Russian-market service, so the currency isn't a typo), and total_tokens. The node's own widget shows a preview plus the token/cost line, so you don't need extra display nodes to see what you paid.
Installing it
Easiest via ComfyUI Manager: search ComfyUI-Polza → install → restart. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/PioneerMNDR/ComfyUI-Polza
cd ComfyUI-Polza
pip install -r requirements.txt
Then restart ComfyUI. Dependencies are just requests, Pillow, numpy, torch - nothing ComfyUI doesn't already ship, and there are no model files to download.
The API key comes from polza.ai, and you set it one of three ways: an api_key field on the node, export POLZA_API_KEY="pk-...", or a config.json in the node folder ({"api_key": "pk-..."}). If none are present the node fails gracefully with a "key not found" message in its own widget.
Common issues
"Click Load models first" - you clicked Queue before loading the model list. Set the key, click the button, then run. Errors like ❌ HTTP 4xx - the node surfaces API failures in its text widget, not the console, so look there first. And remember the actual limits: the API filters whatever the vendor filters - you can't abliterate a refusal you don't have the weights for - and your prompts leave your machine by design. It's MIT-licensed and open, so read the source before you trust it, which is decent advice for every node in the API-wrapper category. For a model you genuinely can't run locally, that's a fair trade; for a job your 8B local model handles fine, it's a tax.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| model | COMBO | openai/gpt-4o | ID модели: openai/gpt-4o, anthropic/claude-sonnet-4-5-20250929, google/gemini-2.5-flash-preview, deepseek/deepseek-chat … |
| prompt | STRING | Текст запроса (user message) | |
| api_keyopt | STRING | API‑ключ Polza.ai. Пусто → POLZA_API_KEY / config.json | |
| system_promptopt | STRING | Системная инструкция (role=system) | |
| temperatureopt | FLOAT | 1.000–2 | 0 = детерминированный, 2 = максимально креативный |
| max_tokensopt | INT | 20481–128000 | Лимит токенов в ответе |
| top_popt | FLOAT | 1.000–1 | Nucleus sampling |
| frequency_penaltyopt | FLOAT | 0.0-2–2 | Штраф за повторение слов |
| presence_penaltyopt | FLOAT | 0.0-2–2 | Штраф за повторение токенов |
| seedopt | INT | 00–2147483647 | Seed для воспроизводимости (0 = случайный) |
| reasoning_effortopt | COMBO | none | Уровень рассуждений (для o1, o3, DeepSeek‑R1 и др.) |
| response_formatopt | COMBO | text | Формат ответа: text или json_object |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |
| reasoning | STRING | — |
| cost_rub | FLOAT | — |
| total_tokens | INT | — |