News Center 2026-06-05 11:43 655 views

ComfyUI Relay API: Call GPTImage2 and Any Model via Relay Stations

ComfyUI-relayapi is a lightweight custom node that lets you call various relay station APIs through a unified interface, enabling one-stop AI workflows for text-to-image, video generation, and music creation in ComfyUI. This article provides a detailed installation, configuration, and usage tutorial.

Are you tired of having to rebuild your entire toolchain every time you want to switch models? Now, with the open-source project ComfyUI-relayapi, you can connect any relay station API in ComfyUI and effortlessly call mainstream AI models like GPT Image 2, Gemini, and Veo for one-stop image, video, and audio generation.

Using Custom Nodes to Call Any API in ComfyUI

ComfyUI-relayapi is a lightweight, ready-to-use custom node package. Through a unified configuration interface, it helps users conveniently call various third-party relay station APIs within ComfyUI workflows. Whether it's text generation, image creation, video production, or music synthesis, one node is all you need.

https://github.com/flywhale-666/ComfyUI-relayapi.git

ComfyUI Relay API: Call GPTImage2 and Any Model via Relay Stations

Core Features

This project provides 5 core nodes with clear categorization:

  • Relay API Settings: Unified configuration of task type, platform, API format, relay station address, model, and API key

  • Relay Text Generator: Text generation, multi-turn dialogue, and multi-image visual understanding

  • Relay Image Generator: Text-to-image, image editing/reference image fusion

  • Relay Video Generator: Video generation (supports Grok/Veo with built-in async task creation and status polling)

  • Relay Sound Generator: AI music generation (deeply adapted for the Suno interface)

Installation

  1. Clone or download the project to ComfyUI's custom nodes directory: ComfyUI/custom_nodes/ComfyUI-relayapi/

  2. Restart ComfyUI

  3. Enter RelayAPI in the node search bar to see all related nodes

ComfyUI Relay API: Call GPTImage2 and Any Model via Relay Stations

Supported Model Types

Currently supported task types and built-in models:

  • Text generation: gemini-3.1-flash-lite-preview, claude-opus-4-6, etc. (supports openai_style/gemini_style formats)

  • Image generation: gpt-image-2, nano-banana-pro, gemini-3-pro-image-preview, etc.

  • Video generation: grok-video-3, veo3.1, veo3.1-fast (supports V1/V2 interfaces)

  • Music generation: Suno V3–V5.5 complete mapping (chirp-v3.0 to chirp-fenix series)

Configuration and Usage Tutorial

Step 1: Add a Settings Node

Add a Relay API Settings node to the canvas — this is the upstream configuration hub for all generation tasks. You need to set:

  • task_type: text/image/video/sound

  • platform: gemini_style, openai_style, or relay_api_style, etc.

  • model (model name): e.g., gpt-image-2

  • apikey (API key): your relay station key

  • custom_api_base (optional): custom relay station address

Step 2: Connect the Generator Node

Connect the info output wire from the Settings node to the corresponding generator node, such as Relay Image Generator. Then configure the input parameters:

  • Prompt

  • Aspect ratio / Resolution

  • Reference image (optional, for image editing)

Step 3: Execute and Output

Click "Queue Prompt" to begin generation. All nodes return a response (compact JSON) containing status codes, elapsed time, usage information, and more for easy debugging.

ComfyUI Relay API: Call GPTImage2 and Any Model via Relay Stations

Here are several stable, transparently priced relay stations that support ComfyUI-relayapi integration:

  • QiuQiuToken Platform: Free Registration — Provides GPT Image 2, Opus, Gemini, and other mainstream models with low latency and high concurrency

  • luchikey API: Free Registration — Supports multiple model calls with affordable pricing

  • Congming AI: Free Registration — Affordable GPT access

  • !! Important Notice: All API relay stations carry a risk of shutting down! Start with small amounts, make multiple small purchases, and never invest large sums for commercial use.

Notes and Optimization Tips

  1. API Key Matching: Keys must strictly correspond to their api_base; mixing them will cause empty response errors

  2. Async Task Handling: Video and music generation use a "submit-poll" mechanism; nodes automatically handle the full flow from creation to status querying

  3. Resolution Limitations: Some relay station/model channels may ignore high-resolution parameters (e.g., requesting 1080P but actually returning 720P) — this is a server-side limitation

  4. Content Filtering: If content moderation is triggered, a PUBLIC_ERROR_UNSAFE_GENERATION response will be returned

  5. Anti-Freeze Optimization: Base64 images in video responses are truncated to length hints to prevent UI lag

Frequently Asked Questions

Q: How do I add a new relay station address?
A: Simply enter the new address in the custom_api_base field of the Settings node; enter delete:address to remove an old address.

Q: Where is the configuration file?
A: Configuration is automatically saved to relay_config.json in the project root directory. ⚠️ Never submit configuration files containing real API keys to public repositories.

Q: Which video generation models are supported?
A: Currently built-in models include grok-video-3, veo3.1, and veo3.1-fast, called via V1/V2 interfaces.

Whether you're an image designer, video creator, or music producer, you can quickly connect to mainstream AI models through this open-source project and say goodbye to tedious tool switching. Combined with stable relay station services, your creativity will no longer be limited to a single platform.

Published on 2026-06-05