Ideogram 4.0
Images with accurate text, for posters and logos, in 38 sizes up to about 4 megapixels, billed per megapixel by rendering speed.
- by Ideogram
- Image
- from $0.0075/megapixel
- Text to imageText in imagesPosters and logos
On this page
1.Call
OpenAI-compatible image generation; images are returned as cdn.ewest.ai URLs. Every response carries an x-request-id trace ID.
curl https://api.ewest.ai/v1/images/generations \
-H "Authorization: Bearer $EWEST_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "ewest/ideogram-4", "prompt": "a cozy cabin in the snow"}'
# → {"data": [{"url": "https://cdn.ewest.ai/img/…"}]}2.Authentication
Send your API key in the Authorization: Bearer header, as the examples above do (clients built for the Anthropic API can use x-api-key). Create keys under API keys. Keep the key on your server, never in browser code. More in the authentication guide.
3.Schema
What you send and what comes back, for ewest/ideogram-4. The output tables are read from the API's OpenAPI description.
Input
POST /v1/images/generations- The model id,
modelstringRequiredewest/ideogram-4. - What to draw. Up to 10,000 characters.
promptstringRequired - Number of images, 1 to 4.
nintegerOptionaldefault1 - Image size in pixels. One of: 1024x1024, 2048x2048, 1440x2880, 2880x1440, 1664x2496, 2496x1664, 1792x2240, 2240x1792, 1440x2560, 2560x1440, 1600x2560, 2560x1600, 1728x2304, 2304x1728, 1296x3168, 3168x1296, 1152x2944, 2944x1152, 1248x3328, 3328x1248, 1280x3072, 3072x1280, 1024x3072, 3072x1024, 896x1120, 1120x896, 864x1152, 1152x864, 832x1248, 1248x832, 800x1280, 1280x800, 720x1280, 1280x720, 720x1440, 1440x720, 512x1536, 1536x512.
sizestringOptionaldefault1024x1024 - Quality level; higher costs more. One of: turbo, default, quality.
qualitystringOptionaldefaultdefault response_formatstringOptionaldefaulturlurl(on cdn.ewest.ai, kept 7 days) orb64_json.
Output
Returns an image. POST /v1/images/generations answers 200: The images.
- Unix seconds when the images were created.
createdintegerSometimes - The generated images, in order.
dataarray of objectAlways - Link to the image, on
data[].urlstring (uri)Alwayscdn.ewest.ai, kept for 7 days. - The image bytes, base64-encoded; only with
data[].b64_jsonstring (base64)Sometimesresponse_format: b64_json. - The prompt as the model rewrote it, where it does that; otherwise null or absent.
data[].revised_promptstring or nullSometimes - Width of the image in pixels; present for models that report the size of the stored image.
data[].widthintegerSometimes - Height of the image in pixels; present together with
data[].heightintegerSometimeswidth. - Background setting reported by the model, if any.
backgroundstring or nullSometimes - File format reported by the model, if any.
output_formatstring or nullSometimes - Quality level reported by the model, if any.
qualitystring or nullSometimes - Size reported by the model, if any.
sizestring or nullSometimes - Token usage, for models that bill by tokens; zeros otherwise.
usageobjectSometimes - Input plus output tokens.
usage.total_tokensintegerSometimes - Tokens in the input.
usage.input_tokensintegerSometimes - Tokens in the output.
usage.output_tokensintegerSometimes - Breakdown of the input tokens.
usage.input_tokens_detailsobjectSometimes - Tokens from input images.
usage.input_tokens_details.image_tokensintegerSometimes - Tokens from the prompt.
usage.input_tokens_details.text_tokensintegerSometimes
Sample response
{
"created": 1793530277,
"data": [
{
"url": "https://cdn.ewest.ai/img/2026/11/01/7hq2xk9mpz.png"
}
]
}4.Details
- Sizes
- 1024×1024, 2048×2048, 1440×2880, 2880×1440, 1664×2496, 2496×1664, 1792×2240, 2240×1792, 1440×2560, 2560×1440, 1600×2560, 2560×1600, 1728×2304, 2304×1728, 1296×3168, 3168×1296, 1152×2944, 2944×1152, 1248×3328, 3328×1248, 1280×3072, 3072×1280, 1024×3072, 3072×1024, 896×1120, 1120×896, 864×1152, 1152×864, 832×1248, 1248×832, 800×1280, 1280×800, 720×1280, 1280×720, 720×1440, 1440×720, 512×1536, 1536×512
- Quality
- turbo, default, quality
- Image editing
- No
- Output
- Image URL on cdn.ewest.ai (kept 7 days)