ID

ideogram-migration-deep-dive

Provides strangler fig migration strategies to move image generation workloads to Ideogram.

Install

mkdir -p .claude/skills/ideogram-migration-deep-dive && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/7584" && unzip -o skill.zip -d .claude/skills/ideogram-migration-deep-dive && rm skill.zip

Installs to .claude/skills/ideogram-migration-deep-dive

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Migrate from other image generation APIs to Ideogram, or re-architect
69 charsno explicit “when” trigger
Intermediate

Key capabilities

  • Map parameters from DALL-E/Midjourney to Ideogram
  • Implement adapter patterns for multi-provider support
  • Audit existing image generation API usage
  • Validate migration with test prompts
  • Re-architect pipelines for Ideogram features

How it works

It uses the strangler fig pattern to gradually replace legacy image generation providers with an adapter that maps parameters to the Ideogram REST API.

Inputs & outputs

You give it
Legacy API request parameters
You get back
Ideogram-compatible API request

When to use ideogram-migration-deep-dive

  • Migrate from DALL-E to Ideogram
  • Re-architect image generation pipelines
  • Audit current image generation API usage
  • Replace local Stable Diffusion with cloud API

About this skill

Ideogram Migration Deep Dive

Current State

!npm list 2>/dev/null | head -10

Overview

Comprehensive migration guide for moving to Ideogram from DALL-E, Midjourney, Stable Diffusion, or another image generation provider. Uses the strangler fig pattern for gradual migration. Key Ideogram advantages: superior text rendering in images, REST API with no SDK dependency, and flexible style/aspect ratio control.

Migration Types

FromComplexityKey ChangesTimeline
DALL-E (OpenAI)LowAuth header, response format, aspect ratios1-2 days
Midjourney (Discord bot)MediumMove from Discord to REST API1-2 weeks
Stable Diffusion (local)MediumCloud API vs local inference1-2 weeks
Custom pipelineHighFull integration overhaul2-4 weeks

Instructions

Step 1: Audit Current Integration

set -euo pipefail
# Find all image generation API calls
grep -rn "openai\|dall-e\|dalle\|midjourney\|stability\|stablediffusion" \
  --include="*.ts" --include="*.js" --include="*.py" . | head -30

# Count integration points
echo "Integration points:"
grep -rl "images/generations\|api.openai.com\|api.stability.ai" \
  --include="*.ts" --include="*.js" . | wc -l

Step 2: API Mapping -- DALL-E to Ideogram

// === DALL-E (Before) ===
const dallEResponse = await fetch("https://api.openai.com/v1/images/generations", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${OPENAI_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    model: "dall-e-3",
    prompt: "A sunset over mountains",
    n: 1,
    size: "1024x1024",
    quality: "standard",
    style: "natural",
  }),
});
const dallEResult = await dallEResponse.json();
const imageUrl = dallEResult.data[0].url;

// === Ideogram (After) ===
const ideogramResponse = await fetch("https://api.ideogram.ai/generate", {
  method: "POST",
  headers: {
    "Api-Key": process.env.IDEOGRAM_API_KEY!,  // Note: Api-Key, not Authorization
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    image_request: {                             // Note: wrapped in image_request
      prompt: "A sunset over mountains",
      model: "V_2",
      aspect_ratio: "ASPECT_1_1",               // Note: enum, not "1024x1024"
      style_type: "REALISTIC",                   // Note: different style system
      magic_prompt_option: "AUTO",
    },
  }),
});
const ideogramResult = await ideogramResponse.json();
const imageUrl = ideogramResult.data[0].url;    // DOWNLOAD IMMEDIATELY - expires!

Step 3: Parameter Mapping Table

ConceptDALL-EIdeogram (Legacy)Ideogram (V3)
AuthAuthorization: BearerApi-Key: keyApi-Key: key
Body wrapperNoneimage_requestFormData
Size"1024x1024""ASPECT_1_1""1x1"
Widescreen"1792x1024""ASPECT_16_9""16x9"
Portrait"1024x1792""ASPECT_9_16""9x16"
Quality"standard"/"hd"Model choice (V_2/V_2_TURBO)rendering_speed
Style"natural"/"vivid"style_type enumstyle_type + style_preset
Prompt enhanceN/Amagic_prompt_optionmagic_prompt
Countn: 1-4num_images: 1-4num_images: 1-4
Negative promptN/Anegative_promptnegative_prompt
ReproducibilityN/Aseedseed
URL lifetime~1 hour~1 hour~1 hour

Step 4: Adapter Pattern for Gradual Migration

interface ImageGenerationRequest {
  prompt: string;
  aspectRatio: "square" | "landscape" | "portrait";
  quality: "draft" | "standard" | "premium";
  style: "natural" | "artistic" | "design";
  count: number;
}

interface ImageGenerationResult {
  images: Array<{ url: string; seed?: number }>;
  provider: "dall-e" | "ideogram";
}

// Adapter interface
interface ImageProvider {
  generate(req: ImageGenerationRequest): Promise<ImageGenerationResult>;
}

// Ideogram implementation
class IdeogramProvider implements ImageProvider {
  private aspectMap = { square: "ASPECT_1_1", landscape: "ASPECT_16_9", portrait: "ASPECT_9_16" };
  private modelMap = { draft: "V_2_TURBO", standard: "V_2", premium: "V_2" };
  private styleMap = { natural: "REALISTIC", artistic: "GENERAL", design: "DESIGN" };

  async generate(req: ImageGenerationRequest): Promise<ImageGenerationResult> {
    const response = await fetch("https://api.ideogram.ai/generate", {
      method: "POST",
      headers: {
        "Api-Key": process.env.IDEOGRAM_API_KEY!,
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        image_request: {
          prompt: req.prompt,
          model: this.modelMap[req.quality],
          aspect_ratio: this.aspectMap[req.aspectRatio],
          style_type: this.styleMap[req.style],
          num_images: req.count,
          magic_prompt_option: "AUTO",
        },
      }),
    });

    if (!response.ok) throw new Error(`Ideogram: ${response.status}`);
    const result = await response.json();

    return {
      images: result.data.map((d: any) => ({ url: d.url, seed: d.seed })),
      provider: "ideogram",
    };
  }
}

Step 5: Feature-Flagged Traffic Split

function getImageProvider(userId?: string): ImageProvider {
  const percentage = parseInt(process.env.IDEOGRAM_MIGRATION_PCT ?? "0");

  if (percentage >= 100) return new IdeogramProvider();
  if (percentage <= 0) return new DallEProvider();

  // Deterministic split by user ID
  if (userId) {
    const hash = Array.from(userId).reduce((h, c) => h * 31 + c.charCodeAt(0), 0);
    if (Math.abs(hash) % 100 < percentage) return new IdeogramProvider();
  }

  return new DallEProvider();
}

// Migration rollout:
// Week 1: IDEOGRAM_MIGRATION_PCT=10  (internal testing)
// Week 2: IDEOGRAM_MIGRATION_PCT=25  (canary)
// Week 3: IDEOGRAM_MIGRATION_PCT=50  (half traffic)
// Week 4: IDEOGRAM_MIGRATION_PCT=100 (complete)

Step 6: Migration Validation

async function validateMigration(testPrompts: string[]) {
  const results = { passed: 0, failed: 0, errors: [] as string[] };

  for (const prompt of testPrompts) {
    try {
      const provider = new IdeogramProvider();
      const result = await provider.generate({
        prompt,
        aspectRatio: "square",
        quality: "draft",
        style: "natural",
        count: 1,
      });

      if (result.images.length > 0 && result.images[0].url) {
        results.passed++;
      } else {
        results.failed++;
        results.errors.push(`No image returned for: ${prompt.slice(0, 40)}`);
      }
    } catch (err: any) {
      results.failed++;
      results.errors.push(`${prompt.slice(0, 40)}: ${err.message}`);
    }

    await new Promise(r => setTimeout(r, 3000)); // Rate limit
  }

  console.log(`Migration validation: ${results.passed} passed, ${results.failed} failed`);
  if (results.errors.length) console.log("Errors:", results.errors);
}

Ideogram Advantages Post-Migration

  • Text rendering: Ideogram generates legible text inside images (DALL-E struggles with this)
  • Seed reproducibility: Same seed + prompt = same image
  • No SDK dependency: Plain REST API, no openai package needed
  • Style presets: 50+ artistic presets in V3
  • Negative prompts: Explicit control over what to exclude
  • Character consistency: V3 character reference images

Error Handling

IssueCauseSolution
Auth format wrongUsing Authorization: BearerSwitch to Api-Key header
Body format wrongNo image_request wrapperWrap params in image_request
Size format wrongUsing pixel dimensionsUse enum (ASPECT_16_9)
URL expiredNot downloading immediatelyDownload in same function

Output

  • Parameter mapping from DALL-E/Midjourney to Ideogram
  • Adapter pattern supporting multiple providers
  • Feature-flagged gradual migration
  • Validation script for migration testing

Resources

Next Steps

For advanced troubleshooting, see ideogram-debug-bundle.

When not to use it

  • Using Authorization: Bearer headers for Ideogram
  • Using pixel dimensions instead of aspect ratio enums
  • Failing to wrap parameters in image_request

Prerequisites

Access to existing image generation codebaseIdeogram API key

Limitations

  • Ideogram API requires Api-Key header, not Authorization
  • Image URLs expire after ~1 hour
  • Size format requires enums like ASPECT_1_1

How it compares

This migration guide provides a structured parameter mapping and adapter pattern to minimize disruption during provider replacement.

Compared to similar skills

ideogram-migration-deep-dive side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
ideogram-migration-deep-dive (this skill)127dReviewIntermediate
ideogram-hello-world127dCautionBeginner
mcp-builder1363moReviewAdvanced
supabase-developer957moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

More by jeremylongshore

View all by jeremylongshore

analyzing-logs

jeremylongshore

Analyze application logs to detect performance issues, identify error patterns, and improve stability by extracting key insights.

14123

ollama-setup

jeremylongshore

Configure auto-configure Ollama when user needs local LLM deployment, free AI alternatives, or wants to eliminate hosted API costs. Trigger phrases: "install ollama", "local AI", "free LLM", "self-hosted AI", "replace OpenAI", "no API costs". Use when appropriate context detected. Trigger with relevant phrases based on skill purpose.

1167

backtesting-trading-strategies

jeremylongshore

Backtest crypto and traditional trading strategies against historical data. Calculates performance metrics (Sharpe, Sortino, max drawdown), generates equity curves, and optimizes strategy parameters. Use when user wants to test a trading strategy, validate signals, or compare approaches. Trigger with phrases like "backtest strategy", "test trading strategy", "historical performance", "simulate trades", "optimize parameters", or "validate signals".

1071

generating-database-seed-data

jeremylongshore

Process this skill enables AI assistant to generate realistic test data and database seed scripts for development and testing environments. it uses faker libraries to create realistic data, maintains relational integrity, and allows configurable data volumes. u... Use when working with databases or data models. Trigger with phrases like 'database', 'query', or 'schema'.

1033

cursor-codebase-indexing

jeremylongshore

Execute set up and optimize Cursor codebase indexing. Triggers on "cursor index setup", "codebase indexing", "index codebase", "cursor semantic search". Use when working with cursor codebase indexing functionality. Trigger with phrases like "cursor codebase indexing", "cursor indexing", "cursor".

885

testing-mobile-apps

jeremylongshore

Execute mobile app testing on iOS and Android devices/simulators. Use when performing specialized testing. Trigger with phrases like "test mobile app", "run iOS tests", or "validate Android functionality".

810

You might also like

ideogram-hello-world

jeremylongshore

Create a minimal working Ideogram example. Use when starting a new Ideogram integration, testing your setup, or learning basic Ideogram API patterns. Trigger with phrases like "ideogram hello world", "ideogram example", "ideogram quick start", "simple ideogram code".

10

mcp-builder

anthropics

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

136215

supabase-developer

daffy0208

Build full-stack applications with Supabase (PostgreSQL, Auth, Storage, Real-time, Edge Functions). Use when implementing authentication, database design with RLS, file storage, real-time features, or serverless functions.

95185

architecture-patterns

wshobson

Implement proven backend architecture patterns including Clean Architecture, Hexagonal Architecture, and Domain-Driven Design. Use when architecting complex backend systems or refactoring existing applications for better maintainability.

55214

dependency-upgrade

wshobson

Manage major dependency version upgrades with compatibility analysis, staged rollout, and comprehensive testing. Use when upgrading framework versions, updating major dependencies, or managing breaking changes in libraries.

26240

turborepo

vercel

Turborepo monorepo build system guidance. Triggers on: turbo.json, task pipelines, dependsOn, caching, remote cache, the "turbo" CLI, --filter, --affected, CI optimization, environment variables, internal packages, monorepo structure/best practices, and boundaries. Use when user: configures tasks/workflows/pipelines, creates packages, sets up monorepo, shares code between apps, runs changed/affected packages, debugs cache, or has apps/packages directories.

61191

Search skills

Search the agent skills registry