BYOKey Recraft Image
The text-in-image specialist, 89 substyles deep
- IMAGE
Recraft is the "best image generator you never heard of" - a design-focused lab whose V3 model quietly tops leaderboards, with the best text-in-image rendering of the closed crop. This node is the bring-your-own-key way to drop it into a ComfyUI graph. No Comfy credit meter, no proxy: paste a Recraft key, get an IMAGE tensor out like any local sampler.
How it works. A single POST to external.api.recraft.ai/v1/images/generations with your key as a Bearer token. The body mirrors Recraft's own request format field-for-field - prompt, size, n, style, substyle, negative prompt, style_id - and the node parses the response (preferring the data array, falling back to a single image), then decodes the PNG into a [1, H, W, C] torch tensor that plugs into standard image preview/save nodes. Synchronous and quick; no polling to babysit.
The inputs that matter:
prompt- capped at 1000 characters and validated non-empty. Recraft is unusually good with text-in-image, so lean into that: quote the exact words you want rendered.style- the four top-level families:realistic_image,digital_illustration,vector_illustration,logo_raster. This is the backbone of Recraft's whole identity.substyle- 89 options underneath, likehdr,motion_blur,faded_nostalgia,evening_light. This is where Recraft earns its reputation; the palette here is far deeper than any other image API's. Just make sure the substyle matches the style family you picked.style_id- a UUID from Recraft's Infinite Style Library (your own trained styles). Here's the trap: if the style id is a Vector art style, Recraft returns SVG, not a raster image, and this node expects a bitmap - the output will break. Use raster style ids only.n- how many images in one call, 1 to 6. Recraft returns them as a batched tensor, so you get a stack of results for one round-trip. Handy for a quick grid.size- 9 presets from1024x1024up to wide1536x640/ tall640x1536.negative_prompt- supported and worth a sentence; Recraft honors it.
When a style_id is set, Recraft ignores style/substyle entirely - the custom style takes over.
Output: one IMAGE socket (tensor). Into a Save Image or Preview node like anything else.
Install. The whole pack installs the same way:
cd ComfyUI/custom_nodes
git clone https://github.com/MeteorAndy/comfyui-byokey.git
# restart ComfyUI; nodes under api/byokey/...
No model files, no extra deps - just ComfyUI's bundled torch/aiohttp/PIL/numpy/av.
Gotchas. The 1000-char prompt limit is real and enforced, so keep prompts tight. The Vector-style-returns-SVG footgun is the one that'll actually bite you. And it's a fresh pack with no community track record yet - the standing rule for anything that holds an API key applies: skim the source before you trust it.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| api_key | STRING | — | |
| base_url | STRING | https://external.api.recraft.ai/v1 | — |
| prompt | STRING | Prompt for the image generation. | |
| size | COMBO | 1024x1024 | The size of the generated image. |
| n | INT | 11–6 | The number of images to generate. |
| seed | INT | 00–18446744073709550000 | Seed to determine if node should re-run; actual results are nondeterministic regardless of seed. |
| styleopt | COMBO | realistic_image | Style for image generation. Defaults to realistic_image. |
| substyleopt | COMBO | None | Optional substyle (must match the chosen style; 'None' for no substyle). |
| negative_promptopt | STRING | An optional text description of undesired elements on an image. | |
| style_idopt | STRING | Optional UUID of a style from Recraft's Infinite Style Library (do not use a Vector art style; it returns SVG). |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |