Mage Generate (any model)
One node, 28 model families, and a JSON box
- images
- first_frame
- last_frame
- video
- url
- image
- video
- audio
The other three nodes in this pack are the nice ones: fixed widget lists, obvious options, a beginner could use them without documentation. This is the one behind the curtain. It runs any model the Mage API offers - 28 families at last count - and instead of giving you a widget per setting, it hands you a text box and says "put the rest in JSON."
That's not laziness, it's the only design that survives a catalog that changes without the node changing. It's also the node that will teach you the most about what Mage actually sells.
Why it exists
Mage's API isn't just Mango and Cherry. The architecture dropdown lists its house models alongside other people's - nano_banana_v2, gpt_image_2, grok_image, flux2, krea_2, hidream, chroma, guava, anima, sdxl_plus, stable_diffusion_v15 and more, with mango as the default. So it's a single key in front of a mixed catalog: models you could never download at any VRAM, and models you already run locally, on someone else's hardware, one billing relationship.
Whether that's worth it is the same argument as every API node: right tool for a model you can't run, wrong default for one you can. And keep it straight from ComfyUI's own API Nodes, which cover several of these same models on prepaid Comfy credits - this one goes through Mage, on a separate account and bill.
How it works, and where the fields go
You pick an architecture, write a prompt, and optionally name a model_id (a variant like mango-v3s; leave it empty and you get the model's default). Then extra_config takes everything else, as a JSON object:
{"aspect_ratio": "16:9", "duration": "5"}
That's the author's own example, and it's the pattern to copy. Those fields are parsed with a real JSON parser and must be an object - a list or a typo gets you extra_config is not valid JSON: … before anything happens. Note the merge order: your JSON is applied over the prompt, seed and model_id you set in the widgets, so it can override them. That's occasionally useful and more often a confusing bug when you forget it.
Media routing is where this node gets clever. images becomes the request's reference images, first_frame the video's first image, last_frame the last, video the source clip. And before anything is uploaded or billed, it checks whether the architecture you picked documents a field for what you connected - so a model that takes one reference image and gets four fails with "takes one reference image; got 4" instead of a mystery. Validation is free; uploads are not.
If the JSON box is the honest weak point, the outputs are the genuinely clever bit. There are four of them - url, image, video, audio - because the node can't know in advance what a given model produces. Only the matching one carries a value. Wire the wrong one and the branch stops with a message telling you exactly which output to connect instead ("Mango made an image, so the video output is empty"). Connect the url to any string display and it always works, which is the fastest way to find out what a model you've never tried actually returned.
seed is fixed by default, so re-queuing the same request reuses ComfyUI's cache rather than re-billing you.
Installing it
Manager: search Mage. By hand:
cd ComfyUI/custom_nodes
git clone https://github.com/mage-space/ComfyUI-Mage
cd ComfyUI-Mage
pip install -r requirements.txt
Just the mage-space SDK beyond what ComfyUI already ships. Because the catalog is read from that SDK, keeping it current is how you get newly added models:
pip install -U "mage-space>=0.0.0,<0.1"
Then the key, from mage.space under API → API Keys:
export MAGE_API_KEY="your-key-here" # export before starting ComfyUI
or cp config.ini.example config.ini and fill in api_key =. Env var wins, config.ini is gitignored, and the key never ends up inside your workflow - so a shared graph doesn't share your account.
Where people get tripped up
The architecture you want isn't listed. The list comes from the SDK installed in that ComfyUI environment, not from a hardcoded table, so an older SDK means a shorter dropdown. Update it and restart.
Silent money. Bad JSON, unsupported media, a refused option combination, an account without Gems - all of these fail before a run is charged. Interrupting the queue is the exception: that cancels the Mage request and the Gems aren't refunded.
Which model makes what. There's no way to know from the node whether an architecture returns an image, a video or audio until you run it. Learn the catalog from the model reference the tooltip points at, then use the url output as your probe when you're exploring.
Outputs have a shelf life. Mage keeps them 30 days. Wire the media output into the appropriate save node instead of relying on the link.
Beta, really. The pack is at 0.x and this node's job is to mirror a remote catalog that moves under it - the most likely of the four to change shape on you.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| architecture | COMBO | mango | The model family. |
| prompt | STRING | What to generate. Mention saved characters and references by @handle. | |
| model_id | STRING | A model variant, such as mango-v3s. Empty uses the default. | |
| extra_config | STRING | {} | Other fields as a JSON object, such as {"aspect_ratio": "16:9"}. |
| seed | INT | 00–2147483647 | The same seed and inputs reproduce an output. Change it for a new variation. |
| imagesopt | IMAGE | Reference images. | |
| first_frameopt | IMAGE | The image a video starts from. | |
| last_frameopt | IMAGE | The image a video ends on. | |
| videoopt | VIDEO | A source video. |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| url | STRING | Where Mage stores the output for 30 days. |
| image | IMAGE | The output, when the model makes images. |
| video | VIDEO | The output, when the model makes video. |
| audio | AUDIO | The output, when the model makes audio. |