ideogram-local-dev-loop
Configure Ideogram local development with mock responses and testing. Use when setting up a development environment, configuring test workflows, or establishing a fast iteration cycle with Ideogram. Trigger with phrases like "ideogram dev setup", "ideogram local development", "ideogram dev environment", "develop with ideogram", "ideogram testing".
Best use case
ideogram-local-dev-loop is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Configure Ideogram local development with mock responses and testing. Use when setting up a development environment, configuring test workflows, or establishing a fast iteration cycle with Ideogram. Trigger with phrases like "ideogram dev setup", "ideogram local development", "ideogram dev environment", "develop with ideogram", "ideogram testing".
Teams using ideogram-local-dev-loop should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/ideogram-local-dev-loop/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How ideogram-local-dev-loop Compares
| Feature / Agent | ideogram-local-dev-loop | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Configure Ideogram local development with mock responses and testing. Use when setting up a development environment, configuring test workflows, or establishing a fast iteration cycle with Ideogram. Trigger with phrases like "ideogram dev setup", "ideogram local development", "ideogram dev environment", "develop with ideogram", "ideogram testing".
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
Cursor vs Codex for AI Workflows
Compare Cursor and Codex for AI coding workflows, repository assistance, debugging, refactoring, and reusable developer skills.
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
SKILL.md Source
# Ideogram Local Dev Loop
## Overview
Set up a fast local development workflow for Ideogram integrations. Includes a typed client wrapper, mock server for offline development (avoids burning credits), and vitest integration for automated testing.
## Prerequisites
- Completed `ideogram-install-auth` setup
- Node.js 18+ with npm/pnpm
- `IDEOGRAM_API_KEY` environment variable set
## Instructions
### Step 1: Create Project Structure
```
my-ideogram-project/
├── src/
│ ├── ideogram/
│ │ ├── client.ts # Typed Ideogram client wrapper
│ │ ├── types.ts # Request/response type definitions
│ │ └── mock-server.ts # Local mock for offline dev
│ └── index.ts
├── tests/
│ └── ideogram.test.ts
├── .env.local # Local secrets (git-ignored)
├── .env.example # Template for team
├── tsconfig.json
└── package.json
```
### Step 2: Install Dependencies
```bash
set -euo pipefail
npm install dotenv
npm install -D typescript tsx vitest @types/node
```
### Step 3: Type Definitions
```typescript
// src/ideogram/types.ts
export type StyleType = "AUTO" | "GENERAL" | "REALISTIC" | "DESIGN" | "RENDER_3D" | "ANIME";
export type AspectRatio = "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";
export type Model = "V_1" | "V_1_TURBO" | "V_2" | "V_2_TURBO" | "V_2A" | "V_2A_TURBO";
export type MagicPrompt = "AUTO" | "ON" | "OFF";
export interface GenerateRequest {
prompt: string;
model?: Model;
style_type?: StyleType;
aspect_ratio?: AspectRatio;
magic_prompt_option?: MagicPrompt;
negative_prompt?: string;
num_images?: number;
seed?: number;
}
export interface ImageResult {
url: string;
prompt: string;
resolution: string;
is_image_safe: boolean;
seed: number;
style_type: StyleType;
}
export interface GenerateResponse {
created: string;
data: ImageResult[];
}
```
### Step 4: Client Wrapper
```typescript
// src/ideogram/client.ts
import type { GenerateRequest, GenerateResponse } from "./types";
const IDEOGRAM_API = "https://api.ideogram.ai";
export class IdeogramClient {
constructor(private apiKey: string) {
if (!apiKey) throw new Error("IDEOGRAM_API_KEY is required");
}
async generate(request: GenerateRequest): Promise<GenerateResponse> {
const response = await fetch(`${IDEOGRAM_API}/generate`, {
method: "POST",
headers: {
"Api-Key": this.apiKey,
"Content-Type": "application/json",
},
body: JSON.stringify({ image_request: request }),
});
if (!response.ok) {
const body = await response.text();
throw new IdeogramError(response.status, body);
}
return response.json();
}
}
export class IdeogramError extends Error {
constructor(public status: number, public body: string) {
super(`Ideogram API error ${status}: ${body}`);
this.name = "IdeogramError";
}
}
```
### Step 5: Mock Server for Offline Development
```typescript
// src/ideogram/mock-server.ts
import type { GenerateResponse } from "./types";
// Use this in development to avoid burning real credits
export function mockGenerate(prompt: string): GenerateResponse {
return {
created: new Date().toISOString(),
data: [{
url: `https://placehold.co/1024x1024/333/fff?text=${encodeURIComponent(prompt.slice(0, 30))}`,
prompt,
resolution: "1024x1024",
is_image_safe: true,
seed: Math.floor(Math.random() * 100000),
style_type: "GENERAL",
}],
};
}
```
### Step 6: Vitest Tests
```typescript
// tests/ideogram.test.ts
import { describe, it, expect, vi } from "vitest";
import { IdeogramClient, IdeogramError } from "../src/ideogram/client";
import { mockGenerate } from "../src/ideogram/mock-server";
describe("IdeogramClient", () => {
it("should reject missing API key", () => {
expect(() => new IdeogramClient("")).toThrow("IDEOGRAM_API_KEY is required");
});
it("should construct generate request correctly", async () => {
const fetchSpy = vi.spyOn(globalThis, "fetch").mockResolvedValue(
new Response(JSON.stringify(mockGenerate("test")), { status: 200 })
);
const client = new IdeogramClient("test-key");
const result = await client.generate({ prompt: "test", model: "V_2" });
expect(fetchSpy).toHaveBeenCalledWith(
"https://api.ideogram.ai/generate",
expect.objectContaining({
method: "POST",
headers: expect.objectContaining({ "Api-Key": "test-key" }),
})
);
expect(result.data[0].prompt).toBe("test");
fetchSpy.mockRestore();
});
it("should throw IdeogramError on 401", async () => {
vi.spyOn(globalThis, "fetch").mockResolvedValue(
new Response("Unauthorized", { status: 401 })
);
const client = new IdeogramClient("bad-key");
await expect(client.generate({ prompt: "test" })).rejects.toThrow(IdeogramError);
});
});
describe("mockGenerate", () => {
it("should return valid response shape", () => {
const result = mockGenerate("hello world");
expect(result.data).toHaveLength(1);
expect(result.data[0].is_image_safe).toBe(true);
expect(result.data[0].seed).toBeGreaterThan(0);
});
});
```
### Step 7: Development Scripts
```json
{
"scripts": {
"dev": "tsx watch src/index.ts",
"test": "vitest run",
"test:watch": "vitest --watch",
"generate": "tsx src/index.ts"
}
}
```
## Error Handling
| Error | Cause | Solution |
|-------|-------|----------|
| Module not found | Missing dependency | Run `npm install` |
| Env not loaded | Missing `.env.local` | Copy from `.env.example` |
| Test timeout | Mocking not set up | Use `mockGenerate` in tests |
| Credits burned in tests | Using real API in CI | Mock `fetch` in test files |
## Output
- Typed client wrapper for Ideogram API
- Mock server for offline development
- Vitest test suite with fetch mocking
- Fast iteration cycle without spending credits
## Resources
- [Ideogram API Reference](https://developer.ideogram.ai/api-reference)
- [Vitest Documentation](https://vitest.dev/)
- [tsx Runner](https://github.com/privatenumber/tsx)
## Next Steps
See `ideogram-sdk-patterns` for production-ready code patterns.Related Skills
workhuman-local-dev-loop
Workhuman local dev loop for employee recognition and rewards API. Use when integrating Workhuman Social Recognition, or building recognition workflows with HRIS systems. Trigger: "workhuman local dev loop".
wispr-local-dev-loop
Wispr Flow local dev loop for voice-to-text API integration. Use when integrating Wispr Flow dictation, WebSocket streaming, or building voice-powered applications. Trigger: "wispr local dev loop".
windsurf-local-dev-loop
Configure Windsurf local development workflow with Cascade, Previews, and terminal integration. Use when setting up a development environment, configuring Turbo mode, or establishing a fast iteration cycle with Windsurf AI. Trigger with phrases like "windsurf dev setup", "windsurf local development", "windsurf dev environment", "windsurf workflow", "develop with windsurf".
webflow-local-dev-loop
Configure a Webflow local development workflow with TypeScript, hot reload, mocked API tests, and webhook tunneling via ngrok. Use when setting up a development environment, configuring test workflows, or establishing a fast iteration cycle with the Webflow Data API. Trigger with phrases like "webflow dev setup", "webflow local development", "webflow dev environment", "develop with webflow".
vercel-local-dev-loop
Configure Vercel local development with vercel dev, environment variables, and hot reload. Use when setting up a development environment, testing serverless functions locally, or establishing a fast iteration cycle with Vercel. Trigger with phrases like "vercel dev setup", "vercel local development", "vercel dev environment", "develop with vercel locally".
veeva-local-dev-loop
Veeva Vault local dev loop for REST API and clinical operations. Use when working with Veeva Vault document management and CRM. Trigger: "veeva local dev loop".
vastai-local-dev-loop
Configure Vast.ai local development with testing and fast iteration. Use when setting up a development environment, testing instance provisioning, or building a fast iteration cycle for GPU workloads. Trigger with phrases like "vastai dev setup", "vastai local development", "vastai dev environment", "develop with vastai".
twinmind-local-dev-loop
Set up local development workflow with TwinMind API integration. Use when building applications that integrate TwinMind transcription, testing API calls locally, or developing meeting automation tools. Trigger with phrases like "twinmind dev setup", "twinmind local development", "twinmind API testing", "build with twinmind".
together-local-dev-loop
Together AI local dev loop for inference, fine-tuning, and model deployment. Use when working with Together AI's OpenAI-compatible API. Trigger: "together local dev loop".
techsmith-local-dev-loop
TechSmith local dev loop for Snagit COM API and Camtasia automation. Use when working with TechSmith screen capture and video editing automation. Trigger: "techsmith local dev loop".
supabase-local-dev-loop
Configure Supabase local development with the CLI, Docker, and migration workflow. Use when initializing a Supabase project locally, starting the local stack, writing migrations, seeding data, or iterating on schema changes. Trigger with phrases like "supabase local dev", "supabase start", "supabase init", "supabase db reset", "supabase local setup".
stackblitz-local-dev-loop
Configure local development for WebContainer applications with hot reload and testing. Use when building browser-based IDEs, testing WebContainer file operations, or setting up development workflows for WebContainer projects. Trigger: "stackblitz dev setup", "webcontainer local", "test webcontainers locally".