Extensions/comfyui-openai-api
ComfyUI Extension

comfyui-openai-api

Mirror of https://git.colorized.life/comfyui-openai-api/

By lany42·Created 2 days ago·Updated a day ago· 0
lany42/comfyui-openai-api
Nodes17
On cloudLocal install
CategoryOpenAI API, OpenAI API/Utils
Stars0
Updateda day ago
Readme

comfpod-openai-api

The canonical home of this repository is at https://git.colorized.life/comfyui-openai-api/

ComfyUI nodes for text and image chat through OpenAI-compatible APIs, forked from ComfyUI OpenAI API.

# Use ComfyUI's Python interpreter (Python 3.13+).
cd /path/to/ComfyUI/custom_nodes
git clone https://git.colorized.life/comfyui-openai-api.git
cd comfyui-openai-api
/path/to/ComfyUI/.venv/bin/python -m pip install -r requirements.txt
# Restart ComfyUI.

Nodes

Find these under OpenAI API. Connect Client → Chat Completion; chain option nodes into its Options input as needed.

| Display name | Node ID | Purpose | | --- | --- | --- | | OpenAI API - Client | Comfpod_OpenAPI_Client | Set the API base URL, key, timeout, and retries | | OpenAI API - Chat Completion | Comfpod_OpenAPI_ChatCompletion | Send text, images, or both; return a response and conversation history | | OpenAI API - Batched Chat Completion | Comfpod_OpenAPI_BatchedChatCompletion | Run independent completions sequentially and return responses in input order | | OpenAI API - Seed | Comfpod_OpenAPI_Seed | Set the request seed | | OpenAI API - Temperature | Comfpod_OpenAPI_Temperature | Control sampling randomness | | OpenAI API - Max Tokens | Comfpod_OpenAPI_MaxTokens | Limit response tokens | | OpenAI API - Top P | Comfpod_OpenAPI_TopP | Set nucleus sampling probability | | OpenAI API - Frequency Penalty | Comfpod_OpenAPI_FrequencyPenalty | Penalize tokens based on how often they appear | | OpenAI API - Presence Penalty | Comfpod_OpenAPI_PresencePenalty | Penalize tokens that have already appeared | | OpenAI API - Developer Role | Comfpod_OpenAPI_DeveloperRole | Choose the instruction message role | | OpenAI API - Extra Body | Comfpod_OpenAPI_ExtraBody | Add custom request body parameters | | OpenAI API - Multiline String to List | Comfpod_OpenAPI_MultilineStringToList | Split multiline text into a STRING execution list | | OpenAI API - Image Batch List | Comfpod_OpenAPI_ImageBatchList | Collect images and batches into one list while preserving each batch | | OpenAI API - Image Batch to List | Comfpod_OpenAPI_ImageBatchToList | Create one group per source image, optionally prepend or append common images without resizing, and output the group count | | OpenAI API - Repeat String to List | Comfpod_OpenAPI_RepeatStringToList | Repeat a complete prompt into a STRING execution list; connect the image group count to match prompt counts | | OpenAI API - Image Batch List to Images | Comfpod_OpenAPI_ImageBatchListToImages | Expose all image groups or one selected invocation as an IMAGE execution list for Preview Image, preserving image order and original sizes | | OpenAI API - CLIP Text Encode List | Comfpod_OpenAPI_CLIPTextEncodeList | Encode each prompt separately with one shared CLIP model and return complete CONDITIONING objects as an execution list in prompt order |

Internal node IDs use the Comfpod_OpenAPI_ prefix to avoid registration collisions with the upstream OpenAI API nodes. Saved workflows using this fork's old OAIAPI_* node IDs need migration: update those nodes' type values (or class_type values in API-format prompts) to Comfpod_OpenAPI_*, keeping the suffix unchanged. Only migrate nodes intended to use this fork; upstream nodes keep their existing IDs. Old-ID aliases are not registered.

Image Batch List to Images: Connect Image Batches from Image Batch List or Image Batch to List, then connect Images to Preview Image. Invocation Index is -1 for all invocations in order, 0 for the first, 1 for the second, and so on. Each image is a separate execution-list entry, preserving its original size; common images appear again for each invocation that includes them.

CLIP Text Encode List: Connect a single CLIP model and a STRING execution list (such as Responses from Batched Chat Completion). Each prompt produces its own complete conditioning, including scheduled entries, in the original prompt order.

License

This fork is distributed under the GNU Affero General Public License, version 3 only (AGPL-3.0-only); see LICENSE.

The upstream code at commit efb68c42291ae77df665423e02d6885a3f556bd1 is copyright © 2025 Edouard Hur and remains available under the MIT License; see LICENSE-MIT.

Original additions and modifications made for this fork after that baseline are licensed under AGPL-3.0-only. Pre-existing upstream portions retain their MIT licensing, including those within subsequently modified files. Third-party material retains its applicable licenses and notices.

See COPYRIGHT for upstream and fork attribution.