| name | ideogram-hello-world |
| description | Create a minimal working Ideogram image generation example.
Use when starting a new Ideogram integration, testing your setup,
or learning basic Ideogram API patterns.
Trigger with phrases like "ideogram hello world", "ideogram example",
"ideogram quick start", "simple ideogram code", "first ideogram image".
|
| allowed-tools | Read, Write, Edit, Bash(curl:*), Bash(node:*), Bash(npx:*) |
| version | 1.10.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","ideogram","api","getting-started","image-generation"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
Ideogram Hello World
Overview
Generate your first AI image with Ideogram. Demonstrates the legacy /generate endpoint (JSON body) and the V3 /v1/ideogram-v3/generate endpoint (multipart form). Both return temporary image URLs that must be downloaded promptly.
Prerequisites
- Completed
ideogram-install-auth setup
IDEOGRAM_API_KEY environment variable set
- Node.js 18+ or Python 3.10+
Instructions
Step 1: Quick Test with curl
set -euo pipefail
curl -s -X POST https://api.ideogram.ai/generate \
-H "Api-Key: $IDEOGRAM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"image_request": {
"prompt": "A cheerful golden retriever wearing sunglasses on a beach, with text saying \"Hello Ideogram!\"",
"model": "V_2",
"style_type": "REALISTIC",
"aspect_ratio": "ASPECT_16_9",
"magic_prompt_option": "AUTO"
}
}' | jq '.data[0] | {url, seed, resolution, is_image_safe}'
Step 2: TypeScript -- Generate and Download
import { writeFileSync } from "fs";
async function helloIdeogram() {
const response = await fetch("https://api.ideogram.ai/generate", {
method: "POST",
headers: {
"Api-Key": process.env.IDEOGRAM_API_KEY!,
"Content-Type": "application/json",
},
body: .({
: {
: ,
: ,
: ,
: ,
: ,
: ,
},
}),
});
(!response.) {
();
}
result = response.();
image = result.[];
.();
.(, image.);
.(, image.);
.(, image.);
.(, image.);
.(, image.);
imgResponse = (image.);
buffer = .( imgResponse.());
(, buffer);
.();
}
().(.);