ideogram-sdk-patterns

Featured

Apply production-ready Ideogram API patterns for TypeScript and Python. Use when implementing Ideogram integrations, refactoring API usage, or establishing team coding standards for Ideogram. Trigger with phrases like "ideogram SDK patterns", "ideogram best practices", "ideogram code patterns", "idiomatic ideogram", "ideogram wrapper".

AI & Automation 2,926 stars 433 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Ideogram SDK Patterns ## Overview Production-ready patterns for Ideogram's REST API. Since Ideogram has no official SDK, these patterns provide type-safe wrappers, retry logic, response validation, and multi-tenant support for the `api.ideogram.ai` endpoints. ## Prerequisites - Completed `ideogram-install-auth` setup - Familiarity with async/await and fetch API - Understanding of Ideogram response lifecycle (URLs expire) ## Instructions ### Step 1: Singleton Client with Auto-Download ```typescript // src/ideogram/client.ts import { writeFileSync, mkdirSync } from "fs"; import { join } from "path"; const API_BASE = "https://api.ideogram.ai"; let instance: IdeogramClient | null = null; export function getIdeogramClient(): IdeogramClient { if (!instance) { const key = process.env.IDEOGRAM_API_KEY; if (!key) throw new Error("IDEOGRAM_API_KEY not set"); instance = new IdeogramClient(key); } return instance; } export class IdeogramClient { constructor(private apiKey: string) {} async generate(prompt: string, options: { model?: string; style_type?: string; aspect_ratio?: string; negative_prompt?: string; magic_prompt_option?: string; num_images?: number; seed?: number; } = {}) { const response = await fetch(`${API_BASE}/generate`, { method: "POST", headers: { "Api-Key": this.apiKey, "Content-Type": "application/json" }, body: JSON.stringify({ image_request: { prompt, mode...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category