# ComfyUI

Connect hosted image or video tasks to a local graph while preserving reusable assets.

## Connect through an explicit API node

ComfyUI's [custom-node documentation](https://docs.comfy.org/custom-nodes/overview) describes Python backend nodes with declared inputs, outputs and processing functions. A hosted model connection needs a node or application bridge that implements the selected API contract; a local model-loading node cannot be assumed to accept it.

## Define the node's responsibilities

Use inputs for the model identifier, prompt and supported reference URLs. Keep the SeedRouter key in the server environment or another private credential mechanism. Your node should submit a generation, retain the returned task identifier and retrieve its completed result according to the [task API documentation](https://seedrouter.ai/docs/api/tasks).

The [image quickstart](https://seedrouter.ai/docs/api/quickstart) supplies the request format. Consult the specific model documentation before exposing additional controls: image and video models have different parameters and reference requirements.

## Preserve accepted assets

Keep submission separate from preview and loading. A node that opens an existing result should not create a new generation simply because the graph is viewed again. Store the approved asset with the shot or scene identifier so [comic production](https://seedrouter.ai/solutions/comic-production) can reuse it and remake only selected shots.

If a graph expects a local image tensor or file, the bridge must download and convert the completed asset into that expected representation. An output URL alone does not become a ComfyUI image automatically.

## Validate the bridge

Use saved response fixtures to test state handling and missing-result behavior. For a live check, record the ComfyUI version, custom-node implementation, selected model and completed artifact. Review input mapping and whether repeated graph execution submits another paid request.

This is an implementation pattern based on ComfyUI's node architecture checked on October 12, 2026. It does not claim that SeedRouter supplies an installed, tested custom-node package. Your graph and bridge manage assets; SeedRouter provides the model APIs.
