Synthèse automatique
Un guide de dépannage qui recense les erreurs courantes de l'API Ideogram (401, 400, 402, 422, 429, URL d'image expirée) avec leurs causes et des correctifs prêts à l'emploi.
Points forts
- Associe chaque code HTTP à une cause précise et à une procédure de correction courte
- Fournit des extraits exécutables en bash et TypeScript, notamment une boucle de retry avec backoff exponentiel pour les 429
- Inclut un tableau des paramètres fréquemment mal formatés (aspect_ratio, style_type, model, num_images)
- Couvre la pré-filtration des prompts pour éviter les rejets de sécurité 422
Limites
- Le document est tronqué : la section sur les URL d'image expirées s'arrête en pleine phrase
- Ne traite pas les erreurs serveur 5xx ni les échecs de webhooks ou de téléchargement au-delà d'un bref mention
- La liste de motifs filtrés pour la sécurité est volontairement simpliste et ne remplace pas un vrai contrôle de contenu
À utiliser lorsqu'une requête vers l'API Ideogram échoue avec un code 400, 401, 402, 422 ou 429 et qu'il faut identifier rapidement la cause.
À éviter pour concevoir une intégration Ideogram de zéro ou pour diagnostiquer des pannes réseau et des erreurs 5xx non documentées ici.
Analyse de sécurité
PrudenceThe skill is a straightforward error-reference document for the Ideogram API. Its executable snippets are limited to curl calls to the vendor's own endpoint, small diagnostic shell scripts guarded with `set -euo pipefail`, and backoff/retry logic in TypeScript. Nothing exfiltrates data to unknown hosts, decodes obfuscated payloads, deletes files, or disables safety controls; the only sensitive value used is the user's own API key, sent to the legitimate Ideogram API. Rated caution only because it drives network/billable API calls and reveals key length.
- •Uses Bash(curl:*) to make live POST requests to api.ideogram.ai with the user's IDEOGRAM_API_KEY in the header — legitimate use of a powerful/networked tool, but the key is transmitted to a third-party endpoint and the diagnostic scripts trigger real (billable) image-generation requests.
- •Prints API key length (`${#IDEOGRAM_API_KEY}`) to stdout; a minor information leak (length only, not the value) that could end up in shared logs.
- •Includes `identify`/`convert` (ImageMagick) commands that fall outside the declared `Bash(curl:*)` tool scope — a scope/documentation mismatch rather than a security issue.
- •Skill invokes outbound network requests (`Bash(curl:*)`) to api.ideogram.ai with the user's `IDEOGRAM_API_KEY` in the `Api-Key` header; this is the legitimate purpose of the skill, but the wildcard curl permission is broad and would also allow requests to arbitrary hosts if the agent goes off-script.
- •Examples reference shell utilities not covered by the declared permissions (`identify`, `convert` from ImageMagick) and JS/TS APIs (`fetch`, `writeFileSync`); running them may trigger permission prompts or require broader tool grants than advertised.
- •Sends a minimal test generation request (consuming credits) as part of the diagnostic script; worth noting for cost-sensitive users, though it is disclosed in the flow.
Exemples
My Ideogram request keeps returning 422 'failed the safety checks' for a prompt mentioning a brand name. Help me rewrite the prompt and add a pre-screen check before calling the API.Ideogram is throwing 429s when I generate a batch of images. Show me how to add exponential backoff with jitter around my generate call in TypeScript.Ideogram returns 400 Invalid input on my request; I'm sending aspect_ratio '16:9' and model 'v2'. What are the correct parameter values?name: ideogram-common-errors description: '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".
' allowed-tools: Read, Grep, Bash(curl:*) version: 1.10.0 license: MIT author: Jeremy Longshore jeremy@intentsolutions.io tags:
- saas
- ideogram
- debugging
- errors compatibility: Designed for Claude Code, also compatible with Codex and OpenClaw
Ideogram Common Errors
Overview
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.
Prerequisites
- Ideogram API key configured
- Access to request/response logs
curlavailable for manual testing
Error Reference
401 -- Authentication Failed
HTTP 401 Unauthorized
Cause: Missing, invalid, or revoked API key.
Fix:
set -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:
- Using
Authorization: Bearerinstead ofApi-Keyheader - Whitespace or newlines in the key string
- Key was regenerated in dashboard but not updated in
.env
422 -- Safety Check Failed
{"error": "Prompt or provided image failed the safety checks"}
Cause: Prompt text or uploaded image triggered Ideogram's content filter.
Fix:
- Remove brand names, celebrity names, or trademarked terms
- Avoid violent, sexual, or politically sensitive content
- Remove explicit references to real people
- Rephrase with neutral descriptors
// 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));
}
429 -- Rate Limited
HTTP 429 Too Many Requests
Cause: More than 10 in-flight requests (default limit).
Fix:
async 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");
}
400 -- Bad Request
{"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 |
402 -- Insufficient Credits
HTTP 402 Payment Required
Cause: API credit balance is depleted.
Fix:
- Log into ideogram.ai > Settings > API Beta
- Check current balance and top-up settings
- Increase auto top-up amount or manually add credits
- Default: auto top-up $20 when balance drops below $10
Expired Image URL
HTTP 403 or 404 when downloading generated image
Cause: Ideogram image URLs are temporary (expire after ~1 hour).
Fix:
// 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;
}
Mask Size Mismatch (Edit Endpoint)
{"error": "Invalid input"}
Cause: Mask image dimensions do not match source image dimensions.
Fix:
set -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
Multipart Form Errors (V3 Endpoints)
Cause: V3 endpoints (/v1/ideogram-v3/*) require multipart form data, not JSON.
Fix:
// 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
Quick Diagnostic Script
set -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 Handling
| 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 |
Output
- Identified error root cause
- Applied fix with verification
- Diagnostic output confirming resolution
Resources
Next Steps
For comprehensive debugging, see ideogram-debug-bundle.
Du fichier au premier essai
Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.
Consulter la source et ses fichiers annexesCe téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.
1. Télécharger le fichier
Télécharger SKILL.mdDepuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/ideogram-common-errors-mrzxupiw/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.
Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.
mkdir -p '.skill-downloads/ideogram-common-errors-mrzxupiw' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/ideogram-common-errors-mrzxupiw/download' --output '.skill-downloads/ideogram-common-errors-mrzxupiw/SKILL.md.part' && mv '.skill-downloads/ideogram-common-errors-mrzxupiw/SKILL.md.part' '.skill-downloads/ideogram-common-errors-mrzxupiw/SKILL.md'2. Vérifier les prérequis
Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.
Environnement déclaré par l’auteur : Designed for Claude Code, also compatible with Codex and OpenClaw
Outils déclarés par l’auteur (à vérifier dans votre agent) : Read, Grep, Bash(curl:*)
Extrait original : Prerequisites
- Ideogram API key configured
- Access to request/response logs
curlavailable for manual testing
Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.
3. Charger la skill
Après vérification, copiez le dossier complet dans le projet avec l’une des commandes ci-dessous, puis ouvrez une nouvelle session de l’outil. La commande s’arrête si un dossier du même nom existe déjà : comparez les fichiers avant de le remplacer.
Claude Code
test -f '.skill-downloads/ideogram-common-errors-mrzxupiw/SKILL.md' && test -s '.skill-downloads/ideogram-common-errors-mrzxupiw/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/ideogram-common-errors' && cp -R '.skill-downloads/ideogram-common-errors-mrzxupiw' '.claude/skills/ideogram-common-errors'Codex
test -f '.skill-downloads/ideogram-common-errors-mrzxupiw/SKILL.md' && test -s '.skill-downloads/ideogram-common-errors-mrzxupiw/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/ideogram-common-errors' && cp -R '.skill-downloads/ideogram-common-errors-mrzxupiw' '.agents/skills/ideogram-common-errors'OpenSkills
OpenSkills doit déjà être installé. La procédure locale install/read est contrôlée avec OpenSkills 1.5.0, qui exige Node.js ≥ 20.6.0. Aucun slug du catalogue n’est résolu automatiquement.
Installation officielle d’OpenSkillsopenskills install './.skill-downloads/ideogram-common-errors-mrzxupiw'openskills read 'ideogram-common-errors-mrzxupiw'La lecture doit afficher le contenu du fichier installé et son dossier de base. Elle ne lance ni la skill ni ses dépendances.
Pour un agent qui lit AGENTS.md, synchronisez ensuite l’index. Cette commande modifie AGENTS.md : relisez le diff avant de l’utiliser.
openskills syncMode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.
4. Faire un premier essai
Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :
Lis .skill-downloads/ideogram-common-errors-mrzxupiw/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.
Bonnes pratiques React Hook Form
Developpement
Maîtrisez React Hook Form : évitez les anti-patterns, gérez les abonnements, et traitez correctement reset, dirty state et entrées contrôlées.
Migration Emotion vers Mantine
Developpement
Migrer les styled-components Emotion vers des composants Mantine avec style props et modules CSS. Pour convertir .styled.tsx ou supprimer les imports @emotion.
Détecteur de dérive de périmètre
Developpement
Analyse les diffs git par rapport à une intention pour détecter la dérive de périmètre, fichiers non liés et PR trop larges, puis suggère de garder, diviser ou justifier.