Skip to main content
ideogram-reference-architecture Implement Ideogram reference architecture with prompt templates, asset pipelines, and CDN delivery.
Use when designing new Ideogram integrations, building brand asset systems,
or establishing architecture for image generation at scale.
Trigger with phrases like "ideogram architecture", "ideogram project structure",
"ideogram brand assets", "ideogram pipeline design", "ideogram at scale".
Jump to install Skills Marketplace Discover and explore AI skills built by the community.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Copy promptShow prompt details A direct command skips the review prompt. Inspect the source before running it.
npx skills add https://github.com/jeremylongshore/claude-code-plugins-plus-skills --skill ideogram-reference-architectureThe command stays on one line. Scroll horizontally to inspect it before copying.
Prefer a local copy? Download the files currently available to SkillsMP.
Download Zip Downloading... More from this repository Implement user sign-up and sign-in flows with Clerk.
Use when building authentication UI, customizing sign-in experience,
or implementing OAuth social login.
Trigger with phrases like "clerk sign-in", "clerk sign-up",
"clerk login flow", "clerk OAuth", "clerk social login".
Implement session management and middleware with Clerk.
Use when managing user sessions, configuring route protection,
or implementing token refresh and custom JWT templates.
Trigger with phrases like "clerk session", "clerk middleware",
"clerk route protection", "clerk token", "clerk JWT".
Configure enterprise SSO, role-based access control, and organization management.
Use when implementing SSO integration, configuring role-based permissions,
or setting up organization-level controls.
Trigger with phrases like "clerk SSO", "clerk RBAC",
"clerk enterprise", "clerk roles", "clerk permissions", "clerk organizations".
Related occupations SOC
Based on SOC occupation classification
name ideogram-reference-architecture description Implement Ideogram reference architecture with prompt templates, asset pipelines, and CDN delivery.
Use when designing new Ideogram integrations, building brand asset systems,
or establishing architecture for image generation at scale.
Trigger with phrases like "ideogram architecture", "ideogram project structure",
"ideogram brand assets", "ideogram pipeline design", "ideogram at scale".
allowed-tools Read, Write, Edit, Grep version 1.10.0 license MIT author Jeremy Longshore <jeremy@intentsolutions.io> tags ["saas","ideogram","architecture","reference"] compatibility Designed for Claude Code, also compatible with Codex and OpenClaw
Ideogram Reference Architecture
Overview
Production architecture for AI image generation with Ideogram at scale. Covers prompt templating for brand consistency, generation pipelines using all six API endpoints, asset storage and CDN delivery, and metadata tracking for reproducibility.
Architecture Diagram
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Prompt Engineering Layer โ
โ Templates โ Brand Guidelines โ Negative Prompts โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Ideogram API (api.ideogram.ai) โ
โ โโโโโโโโโโโโ โโโโโโโโโโ โโโโโโโโโ โโโโโโโโโโ โ
โ โ Generate โ โ Edit โ โ Remix โ โDescribeโ โ
โ โ(textโimg)โ โ(inpaint)โ โ(vary) โ โ(imgโtxt)โ โ
โ โโโโโโฌโโโโโโ โโโโโฌโโโโโ โโโโฌโโโโโ โโโโโฌโโโโโ โ
โ โ โ โ โ โ
โ โโโโโโดโโโโโโโโโโโโดโโโโโโโโโโดโโโโโโโโโโโ โ
โ โ โโโโโโโโโโโโ โโโโโโโโโโโ โ
โ โ โ Upscale โ โ Reframe โ โ
โ โ โโโโโโฌโโโโโโ โโโโโโฌโโโโโ โ
โ โโโโโโโโโดโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Post-Processing & Storage โ
โ Download โ Resize โ WebP Convert โ S3/GCS โ CDN โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Instructions
Step 1: Prompt Template System
interface PromptTemplate {
name : string ;
base : string ;
style : string ;
negativePrompt : string ;
aspectRatio : string ;
model : string ;
renderingSpeed ?: string ;
}
const BRAND_TEMPLATES : Record <string , PromptTemplate > = {
: {
: ,
: ,
: ,
: ,
: ,
: ,
},
: {
: ,
: ,
: ,
: ,
: ,
: ,
},
: {
: ,
: ,
: ,
: ,
: ,
: ,
},
: {
: ,
: ,
: ,
: ,
: ,
: ,
},
};
( ): {
template = [templateKey];
(!template) ( );
prompt = template. ;
( [key, value] . (vars)) {
prompt = prompt. ( , value);
}
prompt;
}
socialPost
name
"Social Media Post"
base
"{subject}, modern clean design, vibrant colors, professional"
style
"DESIGN"
negativePrompt
"blurry text, misspelled, watermark, low quality"
aspectRatio
"ASPECT_1_1"
model
"V_2"
blogHero
name
"Blog Hero Image"
base
"{subject}, editorial photography, wide composition, cinematic lighting"
style
"REALISTIC"
negativePrompt
"text overlay, watermark, blurry, oversaturated"
aspectRatio
"ASPECT_16_9"
model
"V_2"
storyVertical
name
"Story / Reel"
base
"{subject}, vertical composition, eye-catching, bold colors"
style
"DESIGN"
negativePrompt
"horizontal layout, small text, blurry"
aspectRatio
"ASPECT_9_16"
model
"V_2_TURBO"
ogImage
name
"Open Graph Image"
base
'{subject}, with text "{title}" in bold clean font, tech aesthetic'
style
"DESIGN"
negativePrompt
"blurry text, misspelled words, cluttered"
aspectRatio
"ASPECT_16_9"
model
"V_2"
function
buildPrompt
templateKey : string , vars : Record <string , string >
string
const
BRAND_TEMPLATES
if
throw
new
Error
`Unknown template: ${templateKey} `
let
base
for
const
of
Object
entries
replace
`{${key} }`
return
Step 2: Generation Service import { writeFileSync, mkdirSync } from "fs" ;
import { join } from "path" ;
const API_KEY = process.env .IDEOGRAM_API_KEY !;
async function generateFromTemplate (
templateKey : string ,
vars : Record <string , string >,
outputDir = "./assets"
) {
const template = BRAND_TEMPLATES [templateKey];
const prompt = buildPrompt (templateKey, vars);
const response = await fetch ("https://api.ideogram.ai/generate" , {
method : "POST" ,
headers : { "Api-Key" : API_KEY , "Content-Type" : "application/json" },
body : JSON .stringify ({
image_request : {
prompt,
model : template.model ,
style_type : template.style ,
aspect_ratio : template.aspectRatio ,
negative_prompt : template.negativePrompt ,
magic_prompt_option : "AUTO" ,
},
}),
});
if (!response.ok ) throw new Error (`Generate failed: ${response.status} ` );
const result = await response.json ();
const image = result.data [0 ];
const imgResp = await fetch (image.url );
const buffer = Buffer .from (await imgResp.arrayBuffer ());
mkdirSync (outputDir, { recursive : true });
const filename = `${templateKey} -${image.seed} .png` ;
writeFileSync (join (outputDir, filename), buffer);
return {
localPath : join (outputDir, filename),
seed : image.seed ,
prompt,
resolution : image.resolution ,
template : templateKey,
};
}
Step 3: Multi-Format Asset Pipeline import sharp from "sharp" ;
async function generateBrandAssetSet (subject : string , title : string ) {
const results = [];
for (const [key, template] of Object .entries (BRAND_TEMPLATES )) {
const asset = await generateFromTemplate (key, { subject, title });
results.push (asset);
await sharp (asset.localPath )
.webp ({ quality : 85 })
.toFile (asset.localPath .replace (".png" , ".webp" ));
await new Promise (r => setTimeout (r, 3000 ));
}
const manifest = results.map (r => ({
template : r.template ,
seed : r.seed ,
prompt : r.prompt ,
files : {
png : r.localPath ,
webp : r.localPath .replace (".png" , ".webp" ),
},
}));
writeFileSync ("./assets/manifest.json" , JSON .stringify (manifest, null , 2 ));
console .log (`Generated ${results.length} brand assets with manifest` );
return results;
}
Step 4: Describe-then-Remix Pipeline
async function referenceBasedGeneration (referenceImagePath : string , modifications : string ) {
const form1 = new FormData ();
form1.append ("image_file" , new Blob ([readFileSync (referenceImagePath)]));
form1.append ("describe_model_version" , "V_3" );
const descResp = await fetch ("https://api.ideogram.ai/describe" , {
method : "POST" ,
headers : { "Api-Key" : API_KEY },
body : form1,
});
const descriptions = await descResp.json ();
const basePrompt = descriptions.descriptions [0 ].text ;
const form2 = new FormData ();
form2.append ("image" , new Blob ([readFileSync (referenceImagePath)]));
form2.append ("prompt" , `${basePrompt} , ${modifications} ` );
form2.append ("image_weight" , "40" );
form2.append ("rendering_speed" , "DEFAULT" );
const remixResp = await fetch ("https://api.ideogram.ai/v1/ideogram-v3/remix" , {
method : "POST" ,
headers : { "Api-Key" : API_KEY },
body : form2,
});
return remixResp.json ();
}
Project Structure project/
โโโ src/
โ โโโ ideogram/
โ โ โโโ client.ts # API wrapper
โ โ โโโ templates.ts # Prompt templates
โ โ โโโ pipeline.ts # Generation pipeline
โ โ โโโ types.ts # TypeScript types
โ โโโ storage/
โ โ โโโ s3.ts # Image upload to S3/GCS
โ โโโ api/
โ โโโ generate.ts # API route handler
โโโ assets/ # Generated image output
โ โโโ manifest.json # Asset tracking
โโโ tests/
โ โโโ templates.test.ts # Prompt template tests
โ โโโ pipeline.test.ts # Pipeline tests (mocked)
โโโ config/
โโโ ideogram.ts # API configuration
โโโ templates.json # Prompt templates (optional)
Error Handling Issue Cause Solution Inconsistent style No template system Use branded prompt templates URL expired Late download Download in same function call Text misspelled Prompt too vague Use DESIGN style, quote exact text Wrong aspect ratio Template mismatch Map templates to target platforms
Output
Prompt template system for brand consistency
Generation service with auto-download
Multi-format asset pipeline (PNG + WebP)
Describe-then-remix pipeline for reference-based generation
Asset manifest for tracking and reproducibility
Resources
Next Steps For multi-environment setup, see ideogram-multi-env-setup.