# Ideogram 4.6 API Documentation > LLM-optimized documentation for Ideogram 4.6. Copy into your AI assistant for integration help. ## Overview **Model ID:** `ideogram-4-6` **Type:** Image Generation **Credit Cost:** 2 credits per image Ideogram 4.6: designs, posters and photoreal images up to native 4K, exact brand colors, see-through backgrounds, edits from up to 5 images, and Precise Edit that changes only what you ask. ## Endpoint ``` POST https://pixeldojo.ai/api/v1/models/ideogram-4-6/run ``` ## Authentication All requests require an API key in the Authorization header: ``` Authorization: Bearer YOUR_API_KEY ``` Get your API key: https://pixeldojo.ai/api-platform/api-keys ## Input Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | `prompt` | string | Yes | - | What to create, or the edit to make when image_urls is supplied. Put any text you want rendered in quotes. Hex codes like #2E4A33 set exact colors. | | `image_urls` | array | No | - | Optional, up to 5. Omit for text-to-image. With images the prompt is an edit instruction: the first image is edited and the rest guide the edit. Precise Edit uses up to 4 guides (3 with a mask). | | `precise` | boolean | No | false | Edits only: change one thing and keep everything else exactly as it is. The result comes back at the first image's own size, up to the chosen resolution. | | `mask_url` | string | No | - | Optional black-and-white mask for the first image. WHITE pixels are edited, BLACK pixels are kept. A masked edit always runs as a Precise Edit. Note: this is the reverse of the Ideogram 4.5 mask. | | `quality` | enum | No | medium | very_low (draft, 2K only), low, medium or high. Higher quality costs more per image. (Options: very_low, low, medium, high) | | `resolution` | enum | No | 2K | 2K (up to 2048x2048) or 4K (up to 4096x4096). 4K costs more. With precise: true, a first image larger than this is scaled down to fit, and 4K needs a first image larger than 2K. (Options: 2K, 4K) | | `aspect_ratio` | enum | No | auto | Output shape. auto lets Ideogram pick from the prompt (square at 4K), or matches the first image on an edit. Ignored for Precise Edit. (Options: auto, 1:1, 16:9, 9:16, 4:3...) | | `transparent_background` | boolean | No | false | Return a PNG with a see-through background. Not available for Precise Edit. | | `magic_prompt` | enum | No | auto | Text-to-image only. Ideogram's own prompt rewrite: auto (decides from your prompt), on or off. (Options: auto, on, off) | | `num_images` | integer | No | 1 | Images to generate (1-4). Billed per image. (min: 1, max: 4) | | `seed` | integer | No | - | Optional seed for reproducible results. | ## Supported Aspect Ratios - `auto` - `1:1` - `16:9` - `9:16` - `4:3` - `3:4` - `3:2` - `2:3` - `4:5` - `5:4` - `2:1` - `1:2` - `3:1` - `1:3` ## Capabilities - Text to Image - Image to Image ## Quick Start ### 1. Submit a Job ```bash curl -X POST "https://pixeldojo.ai/api/v1/models/ideogram-4-6/run" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "prompt": "Die-cut sticker of a smiling orange tabby cat holding a steaming coffee mug, bold black outlines, flat colors, thick white border. Text on the mug: \"MONDAY MODE\"", "resolution": "4K", "aspect_ratio": "1:1", "quality": "high", "transparent_background": true }' ``` **Response:** ```json { "jobId": "job_abc123...", "status": "pending", "statusUrl": "https://pixeldojo.ai/api/v1/jobs/job_abc123", "creditCost": 2, "creditsRemaining": 95 } ``` ### 2. Poll for Results ```bash curl "https://pixeldojo.ai/api/v1/jobs/job_abc123" \ -H "Authorization: Bearer YOUR_API_KEY" ``` **Completed Response:** ```json { "jobId": "job_abc123...", "status": "completed", "output": { "images": ["https://temp.pixeldojo.ai/..."] }, "creditCost": 2 } ``` ## Python Example ```python import requests import time API_KEY = "YOUR_API_KEY" # Submit job response = requests.post( "https://pixeldojo.ai/api/v1/models/ideogram-4-6/run", headers={ "Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json" }, json={ "prompt": "Die-cut sticker of a smiling orange tabby cat holding a steaming coffee mug, bold black outlines, flat colors, thick white border. Text on the mug: \"MONDAY MODE\"", "resolution": "4K", "aspect_ratio": "1:1", "quality": "high", "transparent_background": True } ) job = response.json() job_id = job["jobId"] # Poll for completion while True: status_response = requests.get( f"https://pixeldojo.ai/api/v1/jobs/{'{job_id}'}", headers={"Authorization": f"Bearer {API_KEY}"} ) status = status_response.json() if status["status"] == "completed": print("Output:", status["output"]) break elif status["status"] == "failed": print("Error:", status.get("error")) break time.sleep(2) ``` ## JavaScript Example ```javascript const API_KEY = 'YOUR_API_KEY'; // Submit job const submitResponse = await fetch('https://pixeldojo.ai/api/v1/models/ideogram-4-6/run', { method: 'POST', headers: { 'Authorization': `Bearer ${API_KEY}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ "prompt": "Die-cut sticker of a smiling orange tabby cat holding a steaming coffee mug, bold black outlines, flat colors, thick white border. Text on the mug: \"MONDAY MODE\"", "resolution": "4K", "aspect_ratio": "1:1", "quality": "high", "transparent_background": true }) }); const job = await submitResponse.json(); // Poll for completion const pollForResult = async (jobId) => { while (true) { const statusResponse = await fetch(`https://pixeldojo.ai/api/v1/jobs/${jobId}`, { headers: { 'Authorization': `Bearer ${API_KEY}` } }); const status = await statusResponse.json(); if (status.status === 'completed') return status.output; if (status.status === 'failed') throw new Error(status.error); await new Promise(r => setTimeout(r, 2000)); } }; const output = await pollForResult(job.jobId); console.log('Output:', output); ``` ## Use Saved Characters (@Name) Write `@Name` in the prompt to use a character, product, outfit, location, prop or style saved in the account's Character Studio, for example `"@Mara on a beach at sunset"`. Its photos are added to `image_urls` automatically, after any images you send yourself, so your own image numbering is unchanged. List saved names with `GET /api/v1/characters` and save new ones with `POST /api/v1/characters`. An `@word` that names nothing saved stays plain text. ## Error Codes | Code | Status | Description | |------|--------|-------------| | `unauthorized` | 401 | Invalid or missing API key | | `insufficient_credits` | 402 | Not enough credits | | `invalid_request` | 400 | Invalid parameters | | `model_not_found` | 404 | Model ID not found | | `internal_error` | 500 | Server error | ## Links - **Full Documentation:** https://pixeldojo.ai/api-platform/ideogram-4-6 - **API Keys:** https://pixeldojo.ai/api-platform/api-keys - **Buy Credits:** https://pixeldojo.ai/api-platform/buy-credits - **All Models:** https://pixeldojo.ai/api/v1/models - **OpenAPI Spec:** https://pixeldojo.ai/api/openapi