Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Diagnose and fix Ideogram API errors and exceptions. Use when encountering Ideogram errors, debugging failed requests, or troubleshooting integration issues. Trigger with phrases like "ideogram error", "fix ideogram", "ideogram not working", "debug ideogram", "ideogram 422", "ideogram 429".
.claude/skills/jeremylongshore-ideogram-common-errors/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-10 | ✗→✓ | ▲ Improved | 44% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 73% | 0% |
| case-18 | ✗→✓ | ▲ Improved | 115% | 0% |
| case-19 | ✗→✓ | ▲ Improved | 30% | 0% |
| case-01 | ✓→✓ | = Same ✓ | 66% | 0% |
Quick reference for the most common Ideogram API errors, their root causes, and proven fixes. All Ideogram endpoints return standard HTTP status codes with JSON error bodies.
curl available for manual testingHTTP 401 UnauthorizedCause: Missing, invalid, or revoked API key.
Fix:
bashset -euo pipefail # Verify the key is set and not empty echo "Key length: ${#IDEOGRAM_API_KEY}" # Test auth directly curl -s -o /dev/null -w "%{http_code}" \ -X POST https://api.ideogram.ai/generate \ -H "Api-Key: $IDEOGRAM_API_KEY" \ -H "Content-Type: application/json" \ -d '{"image_request":{"prompt":"test","model":"V_2_TURBO"}}'
Common mistakes:
Authorization: Bearer instead of Api-Key header.envjson{"error": "Prompt or provided image failed the safety checks"}
Cause: Prompt text or uploaded image triggered Ideogram's content filter.
Fix:
typescript// Pre-screen prompts before sending to API const FLAGGED_PATTERNS = [ /\b(coca.?cola|nike|apple|disney)\b/i, /\b(celebrity|politician|president)\b/i, ]; function isPromptSafe(prompt: string): boolean { return !FLAGGED_PATTERNS.some(p => p.test(prompt)); }
HTTP 429 Too Many RequestsCause: More than 10 in-flight requests (default limit).
Fix:
typescriptasync function rateLimitedGenerate(prompt: string) { const maxRetries = 5; for (let attempt = 0; attempt < maxRetries; attempt++) { try { return await generateImage(prompt); } catch (err: any) { if (err.status !== 429) throw err; const delay = 1000 * Math.pow(2, attempt) + Math.random() * 500; console.warn(`Rate limited. Retry in ${delay.toFixed(0)}ms`); await new Promise(r => setTimeout(r, delay)); } } throw new Error("Rate limit retries exhausted"); }
json{"error": "Invalid input"}
Cause: Invalid parameter values in request body.
Common issues:
| Parameter | Wrong | Correct | |-----------|-------|---------| | aspect_ratio | "16:9" | "ASPECT_16_9" (legacy) or "16x9" (V3) | | style_type | "realistic" | "REALISTIC" (uppercase enum) | | model | "v2" | "V_2" (underscore + uppercase) | | num_images | 10 | 1-4 (max 4 per request) | | resolution | Used with aspect_ratio | Use one or the other, not both |
HTTP 402 Payment RequiredCause: API credit balance is depleted.
Fix:
HTTP 403 or 404 when downloading generated imageCause: Ideogram image URLs are temporary (expire after ~1 hour).
Fix:
typescript// ALWAYS download immediately after generation async function generateAndSave(prompt: string): Promise<string> { const result = await generateImage(prompt); const imageUrl = result.data[0].url; // Download within seconds, not later const response = await fetch(imageUrl); if (!response.ok) throw new Error(`Image download failed: ${response.status}`); const buffer = Buffer.from(await response.arrayBuffer()); const path = `./images/gen-${result.data[0].seed}.png`; writeFileSync(path, buffer); return path; }
json{"error": "Invalid input"}
Cause: Mask image dimensions do not match source image dimensions.
Fix:
bashset -euo pipefail # Check dimensions match identify source.png # e.g., 1024x1024 identify mask.png # Must also be 1024x1024 # Resize mask to match source convert mask.png -resize 1024x1024! mask-resized.png
Cause: V3 endpoints (/v1/ideogram-v3/*) require multipart form data, not JSON.
Fix:
typescript// WRONG for V3 endpoints: fetch(url, { body: JSON.stringify({...}), headers: { "Content-Type": "application/json" } }); // CORRECT for V3 endpoints: const form = new FormData(); form.append("prompt", "..."); form.append("aspect_ratio", "1x1"); fetch(url, { body: form, headers: { "Api-Key": key } }); // Do NOT set Content-Type -- FormData handles the boundary
bashset -euo pipefail echo "=== Ideogram Diagnostics ===" echo "API Key set: ${IDEOGRAM_API_KEY:+YES}" echo "Key length: ${#IDEOGRAM_API_KEY}" # Test connectivity STATUS=$(curl -s -o /dev/null -w "%{http_code}" \ -X POST https://api.ideogram.ai/generate \ -H "Api-Key: $IDEOGRAM_API_KEY" \ -H "Content-Type: application/json" \ -d '{"image_request":{"prompt":"test circle","model":"V_2_TURBO","magic_prompt_option":"OFF"}}') echo "API Response: $STATUS" case $STATUS in 200) echo "OK: Auth and generation working" ;; 401) echo "ERROR: Invalid API key" ;; 402) echo "ERROR: Insufficient credits" ;; 422) echo "ERROR: Safety filter (try different prompt)" ;; 429) echo "ERROR: Rate limited (wait and retry)" ;; *) echo "ERROR: Unexpected status $STATUS" ;; esac
| Error | HTTP | Root Cause | Fix | |-------|------|-----------|-----| | Auth failed | 401 | Bad Api-Key header | Verify key, check header name | | Safety filter | 422 | Flagged prompt/image | Rephrase prompt | | Rate limited | 429 | >10 in-flight requests | Exponential backoff | | Bad params | 400 | Wrong enum values | Use exact enum strings | | No credits | 402 | Balance depleted | Top up in dashboard | | URL expired | 403/404 | Late download | Download immediately |
For comprehensive debugging, see ideogram-debug-bundle.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | pass→pass | 18,329 | 12,209 | -33% | 1 | 1 | 0% | 2,046 | 3,406 | +66% | 0 | 0 | — |
case-10 | fail→pass | 19,780 | 9,683 | -51% | 1 | 1 | 0% | 2,740 | 3,956 | +44% | 0 | 0 | — |
case-02 | pass→pass | 19,986 | 14,365 | -28% | 1 | 1 | 0% | 2,803 | 3,805 | +36% | 0 | 0 | — |
case-03 | pass→pass | 7,898 | 5,280 | -33% | 1 | 1 | 0% | 1,534 | 2,968 | +93% | 0 | 0 | — |
case-04 | pass→pass | 11,960 | 10,737 | -10% | 1 | 1 | 0% | 2,237 | 3,098 | +38% | 0 | 0 | — |
case-05 | pass→pass | 10,450 | 4,595 | -56% | 1 | 1 | 0% | 1,038 | 2,472 | +138% | 0 | 0 | — |
case-06 | pass→pass | 11,172 | 10,447 | -6% | 1 | 1 | 0% | 1,164 | 2,989 | +157% | 0 | 0 | — |
case-07 | fail→pass | 14,041 | 4,243 | -70% | 1 | 1 | 0% | 1,627 | 2,808 | +73% | 0 | 0 | — |
case-08 | pass→pass | 8,699 | 10,083 | +16% | 1 | 1 | 0% | 1,704 | 2,823 | +66% | 0 | 0 | — |
case-09 | pass→pass | 17,343 | 27,942 | +61% | 1 | 1 | 0% | 2,058 | 3,605 | +75% | 0 | 0 | — |
case-11 | pass→pass | 7,028 | 2,898 | -59% | 1 | 1 | 0% | 1,137 | 2,501 | +120% | 0 | 0 | — |
case-12 | pass→pass | 14,119 | 8,514 | -40% | 1 | 1 | 0% | 2,393 | 3,486 | +46% | 0 | 0 | — |
case-13 | pass→pass | 12,660 | 30,000 | +137% | 1 | 1 | 0% | 1,246 | 2,882 | +131% | 0 | 0 | — |
case-14 | pass→pass | 14,359 | 24,995 | +74% | 1 | 1 | 0% | 1,750 | 2,769 | +58% | 0 | 0 | — |
case-15 | pass→pass | 19,056 | 45,512 | +139% | 1 | 1 | 0% | 2,680 | 3,482 | +30% | 0 | 0 | — |
case-16 | pass→pass | 9,159 | 5,855 | -36% | 1 | 1 | 0% | 1,663 | 3,042 | +83% | 0 | 0 | — |
case-17 | pass→pass | 6,411 | 11,803 | +84% | 1 | 1 | 0% | 1,117 | 3,147 | +182% | 0 | 0 | — |
case-18 | fail→pass | 11,813 | 6,956 | -41% | 1 | 1 | 0% | 1,044 | 2,248 | +115% | 0 | 0 | — |
case-19 | fail→pass | 21,353 | 16,105 | -25% | 1 | 1 | 0% | 2,672 | 3,479 | +30% | 0 | 0 | — |
case-20 | pass→pass | 18,315 | 6,124 | -67% | 1 | 1 | 0% | 946 | 2,647 | +180% | 0 | 0 | — |
case-21 | pass→pass | 6,837 | 7,406 | +8% | 1 | 1 | 0% | 300 | 2,349 | +683% | 0 | 0 | — |
case-22 | pass→pass | 8,723 | 3,610 | -59% | 1 | 1 | 0% | 427 | 2,592 | +507% | 0 | 0 | — |
case-23 | pass→pass | 12,954 | 13,094 | +1% | 1 | 1 | 0% | 1,085 | 3,148 | +190% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted. The headline lift of +17 percentage points is the difference between those two pass rates over the 23 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.