
This ComfyUI tutorial workflow demonstrates how to generate images with Ideogram 4.0 using either a simple text prompt or a structured JSON caption for precise visual control. The Ideogram4 Caption Prompt Template subgraph guides you to describe a scene summary, style block, background, and optional per-object elements with bounding boxes and hex color palettes. A ResolutionSelector node standardizes width and height, while a MarkdownNote explains the JSON schema so you can author layout-aware prompts without guessing. PreviewAny provides live feedback, and SaveImage writes the final output to disk.
Under the hood, the workflow routes your prompt into a custom Ideogram v4 inference node backed by the ideogram4_fp8_scaled diffusion model and a compatible VAE (flux2-vae). If you provide plain text, the template wraps it for sensible defaults; if you provide structured JSON, it passes through so the model can honor layout, color, and style constraints. This setup mirrors the official caption schema Ideogram 4.0 was trained on, giving you reproducible composition and color control locally. For users who prefer a visual editor, you can optionally add KJNodes and the Ideogram 4 Prompt Builder KJ node to create bounding boxes and palettes interactively.
API
Use this workflow from code
Every Comfy workflow is a JSON graph. The payload below is this workflow, exactly as ComfyUI runs it — fetch it from the URL, keep it in version control, or load it in ComfyUI and run it node by node.
GET https://comfy.org/workflows/download/c0a2671af7c4.jsonFetching workflow JSON…
Run it from Python or TypeScript with the Comfy SDK. The same code targets Comfy Cloud or a ComfyUI you host yourself — only the base URL changes.
# Install (beta)
pip install comfy-sdk # Python
npm i @comfyorg/sdk # TypeScript
# Run this workflow (Python)
from comfy_sdk import Comfy
client = Comfy(api_key="comfyui-...")
wf = client.workflows.from_file("workflow_api.json")
job = client.run(wf)
for output in job.get_outputs("<output-node-id>"):
output.to_file(output.name)The SDK takes a workflow in API format: open this workflow in ComfyUI and use File → Export Workflow (API). API access requires a Comfy Cloud plan with an API key. SDK docs · Get an API key
FAQ














