CatsAPI Grok Imagine Image 2
Grok Imagine Image 2, dropped into your graph as a tensor
- reference_image
- images
- file_paths
- cost_coins
- task_id
- metadata
The Grok Imagine Image 2 node is how you get xAI's image model into a ComfyUI workflow without an X account, without the Grok app, and without a GPU. It's the successor to the pack's older CatsAPI GrokImage node - same shape, newer model - and it behaves like a generator: type a prompt, get an IMAGE tensor out the other side that wires straight into Preview Image, an upscaler, or whatever your graph does next.
Why you'd reach for it
Grok/Aurora is the closed image model that built its reputation on being the least restrictive of the big mainstream services - the one people point to when they're tired of everyone else's safety theatre. Whether that's a feature is your call, but it's the model's whole identity. xAI doesn't hand out weights, so an API node is the only way to slot it next to your local nodes, and this one routes through CatsAPI's pay-per-run coin system rather than a Comfy account. Same tradeoffs as every wrapper: the prompt and your reference image leave the machine, and whatever xAI refuses, the node can't argue with.
How it works
Like every node in this pack, it's a wrapper: cost preview → submit → poll → download → convert. The prompt and (optional) reference image go up to catsapi.com; the returned images are saved as PNGs into ComfyUI/output/catsapi/, then stacked into a proper RGB IMAGE tensor (batch frames are resized to match). Reference images travel as base64 PNGs, which matters if you're feeding big images - they get re-encoded and uploaded as-is.
The inputs that matter
prompt- multiline. The whole job.aspect_ratio- eleven options, from 1:1 through 2:1, 16:9, 4:3 and their verticals; default 1:1. That's your composition control, and there's nosizeorresolutionknob to find.num_images- 1 to 4 results per run. Each becomes a separate frame in the output tensor.max_coins- spending cap; 0 disables it.reference_image(optional) - one image max. Here's the trap: the input is a standardIMAGEport, so you can wire a batch into it, but the node hard-errors if you feed more than one. It refuses rather than silently dropping frames.api_key_override- leave empty locally.
Outputs
images (the IMAGE tensor), file_paths (JSON list of downloaded PNG paths - handy if you want the files outside ComfyUI), cost_coins, task_id, and metadata.
Installing
cd ComfyUI/custom_nodes
git clone https://github.com/maodeyu180/ComfyUI_Catsapi.git
Restart ComfyUI, then configure the key:
export CATSAPI_API_KEY=cats-your-key
python main.py
(~/.catsapi.env works too.) No extra pip packages - the client side of this pack is pure stdlib.
Common issues
- "Too many reference images" - you fed a batch into
reference_image. Add a selector or accept that this node takes one. - Truncated key rejected - if your key contains
..., the client refuses to send it. Copy the full thing. - Filter surprises - Grok's famously light moderation still exists; when a prompt trips it, the model just won't do the thing. That's the vendor, not the node.
- No reproducibility knob - unlike the Seedream nodes in this pack, there's no
seedinput. Same prompt + ratio can differ run to run; that's the model's nature.
Worth saying plainly: this pack is the service's own first-party integration and there's essentially zero community discussion of it on Reddit. For a paid wrapper that's exactly the thing to check yourself - the source is small, so read it, or at minimum keep your key in an env var and treat api_key_override as the never-fill-it-in-for-a-workflow-you-share field it is.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | — | |
| aspect_ratio | COMBO | 1:1 | 11 options: 1:1, 2:1, 20:9, 16:9, 4:3, 3:2, +5 |
| num_images | INT | 11–4 | — |
| max_coins | INT | 00–100000 | — |
| reference_imageopt | IMAGE | — | |
| api_key_overrideopt | STRING | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| file_paths | STRING | — |
| cost_coins | INT | — |
| task_id | STRING | — |
| metadata | STRING | — |