Nodes/ComfyUI_Catsapi/CatsAPI Grok Imagine Image 2
ComfyUI Node

CatsAPI Grok Imagine Image 2

Grok Imagine Image 2, dropped into your graph as a tensor

By maodeyu180·Created 2 months ago·Updated a day ago· 1
CatsAPI Grok Imagine Image 2
  • reference_image
  • images
  • file_paths
  • cost_coins
  • task_id
  • metadata
prompt
aspect_ratio1:1
num_images1
max_coins0
api_key_override

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 no size or resolution knob 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 standard IMAGE port, 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 seed input. 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.

CategoryCatsAPI/Image

Inputs (6)

NameTypeDefaultDescription
promptSTRING
aspect_ratioCOMBO1:111 options: 1:1, 2:1, 20:9, 16:9, 4:3, 3:2, +5
num_imagesINT11–4
max_coinsINT00–100000
reference_imageoptIMAGE
api_key_overrideoptSTRING

Outputs (5)

NameTypeDescription
imagesIMAGE
file_pathsSTRING
cost_coinsINT
task_idSTRING
metadataSTRING