Ideogram Install & Auth
Overview
Set up Ideogram API authentication for AI image generation. Ideogram provides a REST API at api.ideogram.ai for text-to-image generation, editing, remixing, upscaling, and describing images. Authentication uses an Api-Key header on every request.
Prerequisites
- Node.js 18+ or Python 3.10+
- Ideogram account at ideogram.ai
- API key from Ideogram dashboard (Settings > API Beta)
- Payment method configured (auto top-up billing)
Instructions
Step 1: Get Your API Key
- Log into ideogram.ai
- Navigate to Settings (burger icon) > API Beta
- Accept the Developer API Agreement
- Click Manage Payment and add billing info via Stripe
- Click Create API key -- store it immediately, it is shown only once
Step 2: Install HTTP Client
set -euo pipefail
# Node.js (no SDK required -- Ideogram uses a plain REST API)
npm install dotenv
# Python
pip install requests python-dotenv
Step 3: Configure Authentication
# Create .env file (NEVER commit to git)
echo 'IDEOGRAM_API_KEY=your-api-key-here' >> .env
# Add to .gitignore
echo '.env' >> .gitignore
echo '.env.local' >> .gitignore
Step 4: Verify Connection
// verify-ideogram.ts
import "dotenv/config";
async function verifyIdeogramAuth() {
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: "A simple blue circle on white background",
model: "V_2_TURBO",
aspect_ratio: "ASPECT_1_1",
magic_prompt_option: "OFF",
},
}),
});
if (response.ok) {
const result = await response.json();
console.log("Auth verified. Image URL:", result.data[0].url);
console.log("Seed:", result.data[0].seed);
} else {
const err = await response.text();
console.error(`Auth failed (${response.status}):`, err);
}
}
verifyIdeogramAuth();
# verify_ideogram.py
import os, requests
from dotenv import load_dotenv
load_dotenv()
response = requests.post(
"https://api.ideogram.ai/generate",
headers={
"Api-Key": os.environ["IDEOGRAM_API_KEY"],
"Content-Type": "application/json",
},
json={
"image_request": {
"prompt": "A simple blue circle on white background",
"model": "V_2_TURBO",
"aspect_ratio": "ASPECT_1_1",
"magic_prompt_option": "OFF",
}
},
)
if response.ok:
data = response.json()
print("Auth verified. Image URL:", data["data"][0]["url"])
else:
print(f"Auth failed ({response.status_code}):", response.text)
API Base URLs
| API Version |
Base URL |
Notes |
| Legacy (V_2) |
https://api.ideogram.ai/generate |
JSON body with image_request wrapper |
| V3 Generate |
https://api.ideogram.ai/v1/ideogram-v3/generate |
Multipart form data |
| V3 Edit |
https://api.ideogram.ai/v1/ideogram-v3/edit |
Multipart form data |
| V3 Remix |
https://api.ideogram.ai/v1/ideogram-v3/remix |
Multipart form data |
| V3 Reframe |
https://api.ideogram.ai/v1/ideogram-v3/reframe |
Multipart form data |
| Upscale |
https://api.ideogram.ai/upscale |
Multipart form data |
| Describe |
https://api.ideogram.ai/describe |
Multipart form data |
Billing Model
- Auto top-up: balance refills to $20 when it drops below $10 (configurable)
- Default rate limit: 10 in-flight requests
- Image URLs expire -- download immediately after generation
- Enterprise: contact
partnership@ideogram.ai for higher limits
Error Handling
| Error |
HTTP Status |
Cause |
Solution |
| Invalid API Key |
401 |
Key missing or revoked |
Verify key in dashboard, regenerate if needed |
| Rate Limited |
429 |
Exceeded 10 in-flight requests |
Queue requests, add backoff |
| Insufficient Credits |
402 |
Balance depleted |
Top up via dashboard billing |
| Safety Rejected |
422 |
Prompt or image failed safety check |
Rephrase prompt, remove flagged content |
Output
- Environment variable
IDEOGRAM_API_KEY configured
.env file with key (git-ignored)
- Successful test generation confirming connectivity
Resources
Next Steps
After successful auth, proceed to ideogram-hello-world for your first real generation.
1---
2name: ideogram-install-auth
3description: |
4 Install and configure Ideogram API authentication.
5 Use when setting up a new Ideogram integration, configuring API keys,
6 or initializing Ideogram in your project.
7 Trigger with phrases like "install ideogram", "setup ideogram",
8 "ideogram auth", "configure ideogram API key".
9allowed-tools: Read, Write, Edit, Bash(npm:*), Bash(pip:*), Bash(curl:*), Grep
10version: 1.0.0
11license: MIT
12author: Jeremy Longshore <jeremy@intentsolutions.io>
13compatible-with: claude-code, codex, openclaw
14tags: [saas, ideogram, api, authentication, image-generation]
15metadata:
16 source: https://skillmd.com/skills/aibot88/ideogram-install-auth
17---
18
19# Ideogram Install & Auth
20
21## Overview
22Set up Ideogram API authentication for AI image generation. Ideogram provides a REST API at `api.ideogram.ai` for text-to-image generation, editing, remixing, upscaling, and describing images. Authentication uses an `Api-Key` header on every request.
23
24## Prerequisites
25- Node.js 18+ or Python 3.10+
26- Ideogram account at [ideogram.ai](https://ideogram.ai)
27- API key from Ideogram dashboard (Settings > API Beta)
28- Payment method configured (auto top-up billing)
29
30## Instructions
31
32### Step 1: Get Your API Key
331. Log into [ideogram.ai](https://ideogram.ai)
342. Navigate to **Settings** (burger icon) > **API Beta**
353. Accept the Developer API Agreement
364. Click **Manage Payment** and add billing info via Stripe
375. Click **Create API key** -- store it immediately, it is shown only once
38
39### Step 2: Install HTTP Client
40```bash
41set -euo pipefail
42# Node.js (no SDK required -- Ideogram uses a plain REST API)
43npm install dotenv
44
45# Python
46pip install requests python-dotenv
47```
48
49### Step 3: Configure Authentication
50```bash
51# Create .env file (NEVER commit to git)
52echo 'IDEOGRAM_API_KEY=your-api-key-here' >> .env
53
54# Add to .gitignore
55echo '.env' >> .gitignore
56echo '.env.local' >> .gitignore
57```
58
59### Step 4: Verify Connection
60```typescript
61// verify-ideogram.ts
62import "dotenv/config";
63
64async function verifyIdeogramAuth() {
65 const response = await fetch("https://api.ideogram.ai/generate", {
66 method: "POST",
67 headers: {
68 "Api-Key": process.env.IDEOGRAM_API_KEY!,
69 "Content-Type": "application/json",
70 },
71 body: JSON.stringify({
72 image_request: {
73 prompt: "A simple blue circle on white background",
74 model: "V_2_TURBO",
75 aspect_ratio: "ASPECT_1_1",
76 magic_prompt_option: "OFF",
77 },
78 }),
79 });
80
81 if (response.ok) {
82 const result = await response.json();
83 console.log("Auth verified. Image URL:", result.data[0].url);
84 console.log("Seed:", result.data[0].seed);
85 } else {
86 const err = await response.text();
87 console.error(`Auth failed (${response.status}):`, err);
88 }
89}
90
91verifyIdeogramAuth();
92```
93
94```python
95# verify_ideogram.py
96import os, requests
97from dotenv import load_dotenv
98
99load_dotenv()
100
101response = requests.post(
102 "https://api.ideogram.ai/generate",
103 headers={
104 "Api-Key": os.environ["IDEOGRAM_API_KEY"],
105 "Content-Type": "application/json",
106 },
107 json={
108 "image_request": {
109 "prompt": "A simple blue circle on white background",
110 "model": "V_2_TURBO",
111 "aspect_ratio": "ASPECT_1_1",
112 "magic_prompt_option": "OFF",
113 }
114 },
115)
116
117if response.ok:
118 data = response.json()
119 print("Auth verified. Image URL:", data["data"][0]["url"])
120else:
121 print(f"Auth failed ({response.status_code}):", response.text)
122```
123
124## API Base URLs
125
126| API Version | Base URL | Notes |
127|-------------|----------|-------|
128| Legacy (V_2) | `https://api.ideogram.ai/generate` | JSON body with `image_request` wrapper |
129| V3 Generate | `https://api.ideogram.ai/v1/ideogram-v3/generate` | Multipart form data |
130| V3 Edit | `https://api.ideogram.ai/v1/ideogram-v3/edit` | Multipart form data |
131| V3 Remix | `https://api.ideogram.ai/v1/ideogram-v3/remix` | Multipart form data |
132| V3 Reframe | `https://api.ideogram.ai/v1/ideogram-v3/reframe` | Multipart form data |
133| Upscale | `https://api.ideogram.ai/upscale` | Multipart form data |
134| Describe | `https://api.ideogram.ai/describe` | Multipart form data |
135
136## Billing Model
137- Auto top-up: balance refills to $20 when it drops below $10 (configurable)
138- Default rate limit: 10 in-flight requests
139- Image URLs expire -- download immediately after generation
140- Enterprise: contact `partnership@ideogram.ai` for higher limits
141
142## Error Handling
143| Error | HTTP Status | Cause | Solution |
144|-------|-------------|-------|----------|
145| Invalid API Key | 401 | Key missing or revoked | Verify key in dashboard, regenerate if needed |
146| Rate Limited | 429 | Exceeded 10 in-flight requests | Queue requests, add backoff |
147| Insufficient Credits | 402 | Balance depleted | Top up via dashboard billing |
148| Safety Rejected | 422 | Prompt or image failed safety check | Rephrase prompt, remove flagged content |
149
150## Output
151- Environment variable `IDEOGRAM_API_KEY` configured
152- `.env` file with key (git-ignored)
153- Successful test generation confirming connectivity
154
155## Resources
156- [Ideogram Developer Docs](https://developer.ideogram.ai)
157- [API Reference](https://developer.ideogram.ai/api-reference)
158- [API Setup Guide](https://developer.ideogram.ai/ideogram-api/api-setup)
159- [API Pricing](https://ideogram.ai/features/api-pricing)
160
161## Next Steps
162After successful auth, proceed to `ideogram-hello-world` for your first real generation.