Back to Get APIs

GET /api/comfyui-node/:category/:subcategory

Download custom ComfyUI node with GenVR API integration

Method

GET

Authentication

Not Required

Returns

Python file (.py)

Path Parameters

ParameterTypeRequiredDescription
categorystringYesModel category
subcategorystringYesModel identifier

Download Examples

cURL

# Download for a specific model
curl -X GET https://api.genvrresearch.com/api/comfyui-node/imagegen/flux_dev \
  -o genvr_imagegen_flux_dev.py

# Download for a video model
curl -X GET https://api.genvrresearch.com/api/comfyui-node/videogen/runway_gen2 \
  -o genvr_videogen_runway_gen2.py

Python

import requests

# Download node for a model
category = 'imagegen'
subcategory = 'flux_dev'

response = requests.get(
    f'https://api.genvrresearch.com/api/comfyui-node/{category}/{subcategory}'
)

# Save to ComfyUI custom_nodes directory
filename = f'genvr_{category}_{subcategory}.py'
with open(filename, 'w') as f:
    f.write(response.text)

print(f'Downloaded ComfyUI node: {filename}')

Downloaded File Contents

The downloaded Python file includes:

ComfyUI Node Class

Complete node implementation with schema definition

Dynamic Inputs

All model parameters as typed ComfyUI inputs (String, Int, Float, Combo)

GenVR API Integration

Complete generate → status → response workflow with polling

Error Handling

Timeouts, network errors, and generation failures handled gracefully

Installation Instructions

Comments explaining where to place the file and how to configure

Example Generated File

Here's what you get when downloading for flux_dev:

genvr_imagegen_flux_dev_comfyui.py
from comfy_api.latest import ComfyExtension, io

class GenVR_imagegen_FluxDev(io.ComfyNode):
    """GenVR Flux Dev Node"""

    @classmethod
    def define_schema(cls) -> io.Schema:
        return io.Schema(
            node_id="GenVR_imagegen_FluxDev",
            display_name="GenVR: Flux Dev",
            category="GenVR/imagegen",
            inputs=[
                io.String.Input("prompt", multiline=True),
                io.Combo.Input("aspect_ratio", 
                    options=["1:1", "16:9", ...],
                    default="16:9"),
                io.Int.Input("seed", default=-1, ...)
            ],
            outputs=[
                io.String.Output("result_url"),
            ],
        )

    @classmethod
    def execute(cls, seed, prompt, aspect_ratio, ...) -> io.NodeOutput:
        # Complete GenVR API integration
        # Handles generate → status → response workflow
        ...

Installation Steps

1

Download the node file

Use the endpoint or download button on model pages

2

Place in custom_nodes directory

ComfyUI/custom_nodes/genvr_category_subcategory.py
3

Set environment variables

GENVR_UID=your_user_idGENVR_TOKEN=your_access_token
4

Restart ComfyUI

Find the node under "GenVR/{category}" in the node menu