Skip to content
ideogram-core-workflow-b logo

Ideogram Core Workflow B

ideogram-core-workflow-b

Execute Ideogram secondary workflows: edit (Magic Fill), remix, upscale,

SKILL.md

Full skill instructions

Ideogram Core Workflow B -- Edit, Remix, Upscale, Describe, Reframe

Overview

Secondary workflows for Ideogram beyond text-to-image generation. Covers five endpoints: Edit (Magic Fill inpainting), Remix (style transfer with image weight), Upscale (enhance resolution), Describe (image-to-text), and Reframe (extend canvas to new aspect ratio). All image-input endpoints use multipart form data.

Prerequisites

  • Completed ideogram-install-auth setup
  • Source images in JPEG, PNG, or WebP format (max 10MB each)
  • For editing: a black-and-white mask image matching source dimensions

Instructions

Step 1: Edit (Magic Fill / Inpainting)

Replace specific regions of an image using a mask. Black regions in the mask indicate areas to regenerate.

import { readFileSync, writeFileSync, mkdirSync } from "fs";

async function editImage(imagePath: string, maskPath: string, prompt: string, options: {
  style_type?: string;
  rendering_speed?: string;
  magic_prompt?: string;
} = {}) {
  const form = new FormData();
  form.append("image", new Blob([readFileSync(imagePath)]), "image.png");
  form.append("mask", new Blob([readFileSync(maskPath)]), "mask.png");
  form.append("prompt", prompt);
  form.append("style_type", options.style_type ?? "GENERAL");
  form.append("rendering_speed", options.rendering_speed ?? "DEFAULT");
  form.append("magic_prompt", options.magic_prompt ?? "AUTO");

  const response = await fetch("https://api.ideogram.ai/​v1/​ideogram-v3/​edit", {
    method: "POST",
    headers: { "Api-Key": process.env.IDEOGRAM_API_KEY! },
    body: form,
  });

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

  // Download immediately
  const imgResp = await fetch(result.data[0].url);
  const buffer = Buffer.from(await imgResp.arrayBuffer());
  mkdirSync("./​output", { recursive: true });
  writeFileSync(`./​output/​edited-${result.data[0].seed}.png`, buffer);
  return result;
}

// Example: Replace background
await editImage("product.png", "background-mask.png",
  "Clean white studio background with soft shadows");

// Example: Add text to existing image
await editImage("poster.png", "text-area-mask.png",
  'Bold red text saying "SALE 50% OFF"', { style_type: "DESIGN" });

Step 2: Remix (Style Transfer / Variation)

Generate a new image influenced by a source image. The image_weight parameter (1-100) controls how closely the output matches the original.

async function remixImage(imagePath: string, prompt: string, options: {
  image_weight?: number;
  aspect_ratio?: string;
  style_type?: string;
  rendering_speed?: string;
} = {}) {
  const form = new FormData();
  form.append("image", new Blob([readFileSync(imagePath)]), "image.png");
  form.append("prompt", prompt);
  form.append("image_weight", String(options.image_weight ?? 50));
  form.append("aspect_ratio", options.aspect_ratio ?? "1x1");
  form.append("style_type", options.style_type ?? "GENERAL");
  form.append("rendering_speed", options.rendering_speed ?? "DEFAULT");

  const response = await fetch("https://api.ideogram.ai/​v1/​ideogram-v3/​remix", {
    method: "POST",
    headers: { "Api-Key": process.env.IDEOGRAM_API_KEY! },
    body: form,
  });

  if (!response.ok) throw new Error(`Remix failed: ${response.status}`);
  return response.json();
}

// Low weight = more creative freedom, high weight = closer to original
await remixImage("photo.jpg", "Same scene but in watercolor painting style", { image_weight: 30 });
await remixImage("logo.png", "Same logo but with neon glow effect", { image_weight: 80 });

Step 3: Upscale (Enhance Resolution)

async function upscaleImage(imagePath: string, options: {
  prompt?: string;
  resemblance?: number;
  detail?: number;
} = {}) {
  const form = new FormData();
  form.append("image_file", new Blob([readFileSync(imagePath)]), "image.png");
  form.append("image_request", JSON.stringify({
    prompt: options.prompt,
    resemblance: options.resemblance ?? 50,   // 0-100: fidelity to original
    detail: options.detail ?? 50,              // 0-100: level of detail enhancement
    magic_prompt_option: "AUTO",
  }));

  const response = await fetch("https://api.ideogram.ai/​upscale", {
    method: "POST",
    headers: { "Api-Key": process.env.IDEOGRAM_API_KEY! },
    body: form,
  });

  if (!response.ok) throw new Error(`Upscale failed: ${response.status}`);
  const result = await response.json();
  console.log(`Upscaled: ${result.data[0].resolution} -> ${result.data[0].upscaled_resolution}`);
  return result;
}

Step 4: Describe (Image to Text)

async function describeImage(imagePath: string, modelVersion: "V_2" | "V_3" = "V_3") {
  const form = new FormData();
  form.append("image_file", new Blob([readFileSync(imagePath)]), "image.png");
  form.append("describe_model_version", modelVersion);

  const response = await fetch("https://api.ideogram.ai/​describe", {
    method: "POST",
    headers: { "Api-Key": process.env.IDEOGRAM_API_KEY! },
    body: form,
  });

  if (!response.ok) throw new Error(`Describe failed: ${response.status}`);
  const result = await response.json();
  return result.descriptions.map((d: any) => d.text);
}

// Use describe to reverse-engineer prompts for existing images
const descriptions = await describeImage("reference-image.jpg");
console.log("Suggested prompts:", descriptions);

Step 5: Reframe (Extend Canvas)

Expand an image to a new resolution while maintaining style consistency.

async function reframeImage(imagePath: string, resolution: string, options: {
  rendering_speed?: string;
  style_preset?: string;
} = {}) {
  const form = new FormData();
  form.append("image", new Blob([readFileSync(imagePath)]), "image.png");
  form.append("resolution", resolution);  // e.g., "1024x576" for 16:9
  form.append("rendering_speed", options.rendering_speed ?? "DEFAULT");
  if (options.style_preset) form.append("style_preset", options.style_preset);

  const response = await fetch("https://api.ideogram.ai/​v1/​ideogram-v3/​reframe", {
    method: "POST",
    headers: { "Api-Key": process.env.IDEOGRAM_API_KEY! },
    body: form,
  });

  if (!response.ok) throw new Error(`Reframe failed: ${response.status}`);
  return response.json();
}

// Reframe a square image to widescreen
await reframeImage("square-photo.png", "1344x768");

Endpoint Quick Reference

EndpointURLInputKey Parameters
Edit V3/​v1/​ideogram-v3/​editimage + mask + promptstyle_type, rendering_speed
Remix V3/​v1/​ideogram-v3/​remiximage + promptimage_weight (1-100)
Upscale/​upscaleimage + image_request JSONresemblance, detail (0-100)
Describe/​describeimagedescribe_model_version (V_2/​V_3)
Reframe V3/​v1/​ideogram-v3/​reframeimage + resolutionrendering_speed, style_preset

Error Handling

ErrorHTTP StatusCauseSolution
Mask size mismatch400Mask dimensions differ from imageEnsure mask matches source image size exactly
File too large400Image exceeds 10MBCompress or resize before uploading
Safety rejected422Image or prompt flaggedModify content, avoid restricted subjects
Format unsupported400Not JPEG/​PNG/​WebPConvert image to a supported format
Rate limited429Too many requestsQueue with delays between calls

Output

  • Edited, remixed, upscaled, or reframed images downloaded locally
  • Descriptions array for image-to-text analysis
  • Metadata including seed, resolution, and safety status

Resources

Next Steps

For common errors, see ideogram-common-errors.

More skills from jeremylongshore

openrouter-compliance-review logo
jeremylongshore/claude-code-plugins-plus-skills

openrouter-compliance-review

Review OpenRouter integration for regulatory compliance (SOC2, GDPR,

2.8K 0
View
maintainx-data-handling logo
jeremylongshore/claude-code-plugins-plus-skills

maintainx-data-handling

Data synchronization, ETL patterns, and data management for MaintainX.

2.8K 0
View
groq-core-workflow-a logo
jeremylongshore/claude-code-plugins-plus-skills

groq-core-workflow-a

Execute Groq primary workflow: chat completions with tool use and JSON

2.8K 0
View
validating-csrf-protection logo
jeremylongshore/claude-code-plugins-plus-skills

validating-csrf-protection

Validate CSRF protection implementations for security gaps. Use when

2.8K 0
View
api-contract logo
jeremylongshore/claude-code-plugins-plus-skills

api-contract

Configure this skill should be used when the user asks about "API contract",

2.8K 0
View
ideogram-incident-runbook logo
jeremylongshore/claude-code-plugins-plus-skills

ideogram-incident-runbook

Execute Ideogram incident response with triage, mitigation, and postmortem.

2.8K 0
View
gamma-sdk-patterns logo
jeremylongshore/claude-code-plugins-plus-skills

gamma-sdk-patterns

Reusable patterns for the Gamma REST API (no SDK exists).

2.8K 0
View
deepgram-sdk-patterns logo
jeremylongshore/claude-code-plugins-plus-skills

deepgram-sdk-patterns

Apply production-ready Deepgram SDK patterns for TypeScript and Python.

2.8K 0
View
openrouter-upgrade-migration logo
jeremylongshore/claude-code-plugins-plus-skills

openrouter-upgrade-migration

Migrate to OpenRouter from direct provider APIs or upgrade between SDK/model

2.8K 0
View
openrouter-common-errors logo
jeremylongshore/claude-code-plugins-plus-skills

openrouter-common-errors

Diagnose and fix common OpenRouter API errors. Use when encountering

2.8K 0
View
linear-cost-tuning logo
jeremylongshore/claude-code-plugins-plus-skills

linear-cost-tuning

Optimize Linear API usage, reduce unnecessary calls, and maximize

2.8K 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View