ideogram-ci-integration
Configure Ideogram CI/CD integration with GitHub Actions and testing. Use when setting up automated testing, configuring CI pipelines, or integrating Ideogram tests into your build process. Trigger with phrases like "ideogram CI", "ideogram GitHub Actions", "ideogram automated tests", "CI ideogram".
Install
mkdir -p .claude/skills/ideogram-ci-integration && curl -L -o skill.zip "https://mcp.directory/api/skills/download/9122" && unzip -o skill.zip -d .claude/skills/ideogram-ci-integration && rm skill.zipInstalls to .claude/skills/ideogram-ci-integration
About this skill
Ideogram CI Integration
Overview
Set up CI/CD pipelines for Ideogram integrations. Since Ideogram has no free tier for API testing, CI strategies focus on: mocked unit tests (free), optional integration tests gated behind secrets, and prompt validation without API calls.
Prerequisites
- GitHub repository with Actions enabled
- Ideogram API key for integration tests (optional)
- npm/pnpm project with vitest
Instructions
Step 1: GitHub Actions Workflow
# .github/workflows/ideogram-ci.yml
name: Ideogram Integration CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
- run: npm ci
- run: npm test -- --reporter=verbose
- run: npm run lint
# Optional: runs only when secret is configured
integration-tests:
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
env:
IDEOGRAM_API_KEY: ${{ secrets.IDEOGRAM_API_KEY }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
- run: npm ci
- name: Run integration tests
if: env.IDEOGRAM_API_KEY != ''
run: npm run test:integration
timeout-minutes: 5
Step 2: Configure Secrets
set -euo pipefail
# Store Ideogram API key in GitHub repository secrets
gh secret set IDEOGRAM_API_KEY
# Verify it was set
gh secret list
Step 3: Unit Tests with Mocked API
// tests/ideogram-generate.test.ts
import { describe, it, expect, vi, beforeEach, afterEach } from "vitest";
const mockGenerateResponse = {
created: "2025-01-15T10:00:00Z",
data: [{
url: "https://ideogram.ai/assets/image/mock-123.png",
prompt: "test prompt",
resolution: "1024x1024",
is_image_safe: true,
seed: 42,
style_type: "DESIGN",
}],
};
describe("Ideogram Generate", () => {
let fetchSpy: any;
beforeEach(() => {
fetchSpy = vi.spyOn(globalThis, "fetch").mockResolvedValue(
new Response(JSON.stringify(mockGenerateResponse), {
status: 200,
headers: { "Content-Type": "application/json" },
})
);
});
afterEach(() => fetchSpy.mockRestore());
it("sends correct headers", async () => {
await fetch("https://api.ideogram.ai/generate", {
method: "POST",
headers: { "Api-Key": "test-key", "Content-Type": "application/json" },
body: JSON.stringify({ image_request: { prompt: "test" } }),
});
expect(fetchSpy).toHaveBeenCalledWith(
"https://api.ideogram.ai/generate",
expect.objectContaining({
headers: expect.objectContaining({ "Api-Key": "test-key" }),
})
);
});
it("parses response correctly", async () => {
const response = await fetch("https://api.ideogram.ai/generate", {
method: "POST",
headers: { "Api-Key": "test-key", "Content-Type": "application/json" },
body: JSON.stringify({ image_request: { prompt: "test" } }),
});
const result = await response.json();
expect(result.data[0].seed).toBe(42);
expect(result.data[0].is_image_safe).toBe(true);
});
it("handles 429 rate limit", async () => {
fetchSpy.mockResolvedValueOnce(new Response("Rate limited", { status: 429 }));
const response = await fetch("https://api.ideogram.ai/generate", {
method: "POST",
headers: { "Api-Key": "test-key", "Content-Type": "application/json" },
body: JSON.stringify({ image_request: { prompt: "test" } }),
});
expect(response.status).toBe(429);
});
});
Step 4: Prompt Validation in CI (No API Key Required)
// tests/prompt-validation.test.ts
import { describe, it, expect } from "vitest";
const VALID_STYLES = ["AUTO", "GENERAL", "REALISTIC", "DESIGN", "RENDER_3D", "ANIME"];
const VALID_ASPECTS = [
"ASPECT_1_1", "ASPECT_16_9", "ASPECT_9_16", "ASPECT_3_2", "ASPECT_2_3",
"ASPECT_4_3", "ASPECT_3_4", "ASPECT_10_16", "ASPECT_16_10", "ASPECT_1_3", "ASPECT_3_1",
];
function validateIdeogramRequest(req: any): string[] {
const errors: string[] = [];
if (!req.prompt || req.prompt.length === 0) errors.push("Prompt is required");
if (req.prompt?.length > 10000) errors.push("Prompt exceeds 10,000 char limit");
if (req.style_type && !VALID_STYLES.includes(req.style_type)) {
errors.push(`Invalid style_type: ${req.style_type}`);
}
if (req.aspect_ratio && !VALID_ASPECTS.includes(req.aspect_ratio)) {
errors.push(`Invalid aspect_ratio: ${req.aspect_ratio}`);
}
if (req.num_images && (req.num_images < 1 || req.num_images > 4)) {
errors.push("num_images must be 1-4");
}
return errors;
}
describe("Prompt Validation", () => {
it("accepts valid request", () => {
const errors = validateIdeogramRequest({
prompt: "A sunset over mountains",
style_type: "REALISTIC",
aspect_ratio: "ASPECT_16_9",
});
expect(errors).toHaveLength(0);
});
it("rejects empty prompt", () => {
const errors = validateIdeogramRequest({ prompt: "" });
expect(errors).toContain("Prompt is required");
});
it("rejects invalid style", () => {
const errors = validateIdeogramRequest({ prompt: "test", style_type: "INVALID" });
expect(errors[0]).toContain("Invalid style_type");
});
});
Step 5: Integration Test (API Key Required)
// tests/integration/ideogram-live.test.ts
import { describe, it, expect } from "vitest";
describe.skipIf(!process.env.IDEOGRAM_API_KEY)("Ideogram Live API", () => {
it("generates an image successfully", async () => {
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: "CI test: simple geometric shape",
model: "V_2_TURBO",
magic_prompt_option: "OFF",
},
}),
});
expect(response.status).toBe(200);
const result = await response.json();
expect(result.data).toHaveLength(1);
expect(result.data[0].url).toContain("http");
expect(result.data[0].is_image_safe).toBe(true);
}, 30000); // 30s timeout for generation
});
Error Handling
| Issue | Cause | Solution |
|---|---|---|
| Secret not found | Missing in GitHub settings | gh secret set IDEOGRAM_API_KEY |
| Integration timeout | Generation takes 5-15s | Set timeout-minutes: 5 |
| Flaky rate limits | Concurrent CI runs | Run integration tests on main only |
| Credits burned in CI | Too many integration tests | Mock in PRs, live tests on main only |
Output
- GitHub Actions workflow with unit + integration jobs
- Mocked unit tests that run without API key
- Prompt validation tests (zero API calls)
- Gated integration tests for main branch only
Resources
Next Steps
For deployment patterns, see ideogram-deploy-integration.
More by jeremylongshore
View all skills by jeremylongshore →You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
drawio-diagrams-enhanced
jgtolentino
Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.
ui-ux-pro-max
nextlevelbuilder
"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
godot
bfollington
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
nano-banana-pro
garg-aayush
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
pdf-to-markdown
aliceisjustplaying
Convert entire PDF documents to clean, structured Markdown for full context loading. Use this skill when the user wants to extract ALL text from a PDF into context (not grep/search), when discussing or analyzing PDF content in full, when the user mentions "load the whole PDF", "bring the PDF into context", "read the entire PDF", or when partial extraction/grepping would miss important context. This is the preferred method for PDF text extraction over page-by-page or grep approaches.
Related MCP Servers
Browse all serversPica is automated workflow software for business process automation, integrating actions across services via a unified i
Boost your AI code assistant with Context7: inject real-time API documentation from OpenAPI specification sources into y
Boost productivity with Task Master: an AI-powered tool for project management and agile development workflows, integrat
Connect Blender to Claude AI for seamless 3D modeling. Use AI 3D model generator tools for faster, intuitive, interactiv
Integrate FireCrawl for advanced web scraping to extract clean, structured data from complex websites—fast, scalable, an
Genkit — consume MCP resources or expose powerful Genkit tools as a server for streamlined development and integration.
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.