Loading...
Loading...
Prompting patterns for Ideogram 4 text-to-image — best-in-class in-image text rendering and exact color/layout control via structured JSON captions. Use when generating images that need legible on-image text (title cards, thumbnails, logos, signage, CTAs), precise brand colors, or controlled spatial layout. Triggers include title slide image, thumbnail with text, on-image text, legible text in image, brand color palette image, bounding-box layout, Ideogram.
npx skill4agent add digitalsamba/claude-code-video-toolkit ideogram4Backend: The toolkit uses Ideogram's hosted v4 API (not self-hosted weights). The API accepts a structured, so everything this skill teaches applies directly — Claude builds the caption, the tool posts it asjson_prompt. Paid API plans include a commercial license, which the self-hostable weights (non-commercial) do not — that's why we use the API. Cost is ~$0.03/image (turbo) to ~$0.10/image (quality).json_prompt
tools/flux2.py{"high_level_description":"A sailboat at sunset on calm water.","style_description":{"aesthetics":"serene, warm, golden hour","lighting":"golden hour backlighting","photo":"wide angle, f/8","medium":"photograph","color_palette":["#FF6B35","#F7C59F","#004E89"]},"compositional_deconstruction":{"background":"Calm ocean at low horizon with orange-pink sky.","elements":[{"type":"obj","desc":"White triangular sail silhouetted against the setting sun."}]}}prompting.mdexamples.mdtools/ideogram4.pyThin wrapper over Ideogram's hosted v4 API. NeedsinIDEOGRAM_API_KEY(key from developer.ideogram.ai)..envposts the caption as the API's--jsonfield (no server-side magic prompt — Claude is the expander);json_promptposts--prompt.text_prompt
# Hand-authored JSON caption (the recommended path for text/layout) — Claude writes caption.json
uv run tools/ideogram4.py --json caption.json --output title.png
# Caption from stdin (Claude can pipe it directly)
cat caption.json | uv run tools/ideogram4.py --json - --output title.png
# Plain prompt — Ideogram's server-side magic prompt expands it (weaker; prefer --json)
uv run tools/ideogram4.py --prompt "Title card: 'AI ENGINEERING REVIEW' bold white on dark" --output title.png
# Inject brand hex colors into the caption's palette (JSON mode)
uv run tools/ideogram4.py --json caption.json --brand digital-samba --output cta.png
# Quality tier + resolution
uv run tools/ideogram4.py --json caption.json --speed QUALITY --resolution 2048x2048 --output slide.png--model 4.5POST /v2/image/generate/ideogram-4-5/thumbnailuv run tools/ideogram4.py --model 4.5 --json caption.json --speed QUALITY --resolution 1440x2560 --output card.pngprompt--json--prompt--speedquality | 4.5 | Per image |
|---|---|---|
| FLASH, TURBO | | $0.03 |
| DEFAULT (the default) | | $0.06 |
| QUALITY | | $0.10 |
very_low--model 4--resolutionsizeauto1440x25602048x2048prompting.mdexamples.md| Use case | Why Ideogram 4 |
|---|---|
| Title-card / CTA background with headline text | Legible text + exact brand hex colors in one pass |
| YouTube/social thumbnail with a punchy phrase | Big readable text is its strongest suit |
| Quote card / stat card | Multi-line text + layout control via bboxes |
| Signage/logos inside a product-demo scene | In-image text other models can't render |
<OffthreadVideo>Imgtools/ltx2.py --input