POST
javascript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 const axios = require('axios'); const api_key = "YOUR API-KEY"; const url = "https://api.segmind.com/v1/ideogram-4"; const data = { "prompt": "A vintage-style travel poster of Tokyo at night, glowing neon signs reflecting on wet streets, a bold title reading \"TOKYO\" across the top and the tagline \"Where Tradition Meets Tomorrow\" below, vibrant teal and magenta palette, clean retro print design", "rendering_speed": "QUALITY", "image_size": "square_hd", "num_images": 1, "enable_prompt_expansion": true, "output_format": "jpeg", "seed": 123456, "enable_safety_checker": true }; (async function() { try { const response = await axios.post(url, data, { headers: { 'x-api-key': api_key } }); console.log(response.data); } catch (error) { console.error('Error:', error.response.data); } })();
RESPONSE
image/jpeg
HTTP Response Codes
200 - OKImage Generated
401 - UnauthorizedUser authentication failed
404 - Not FoundThe requested URL does not exist
405 - Method Not AllowedThe requested HTTP method is not allowed
406 - Not AcceptableNot enough credits
500 - Server ErrorServer had some issue with processing

Attributes


promptstr *

Describe the image; put exact in-image text in quotes. More detail improves design and typography.


rendering_speedenum:str ( default: QUALITY ) Affects Pricing

Speed/quality tradeoff. Use QUALITY for text-heavy design, TURBO for fast cheap drafts.

Allowed values:


image_sizeenum:str ( default: square_hd )

Output aspect ratio and resolution. Portrait suits posters, landscape banners, square_hd is default.

Allowed values:


num_imagesint ( default: 1 )

Images generated per request, 1 to 8. Raise to compare variations in one call.

min : 1,

max : 8


enable_prompt_expansionbool ( default: true )

LLM expands your prompt for richer detail. Disable when exact in-image text must stay unchanged.


output_formatenum:str ( default: jpeg )

Image file format. jpeg for smaller files, png for transparency and crisp text edges.

Allowed values:


seedint ( default: 123456 )

Random seed; -1 randomizes. Fix a value to reproduce the same image across runs.

min : -1,

max : 2147483647


enable_safety_checkerbool ( default: true )

Filters unsafe content from outputs. Keep enabled for production and public-facing apps.

To keep track of your credit usage, you can inspect the response headers of each API call. The x-remaining-credits property will indicate the number of remaining credits in your account. Ensure you monitor this value to avoid any disruptions in your API usage.

Ideogram 4.0: Text-to-Image Generation

What is Ideogram 4.0?

Ideogram 4.0 is a 9.3-billion-parameter, open-weight text-to-image model built from scratch as a single-stream Diffusion Transformer. It pairs a vision-language text encoder with structured prompting, which is why it leads its class on accurate, legible text inside images. The model generates at native 2K resolution (up to 2048 px per side) with flexible aspect ratios, so headlines, logos, and dense layouts come out sharp without a separate upscaling pass. For designers, marketers, and developers, Ideogram 4.0 is the model to reach for when the words in the picture matter as much as the picture itself.

Key Features

  • Best-in-class text rendering, including strong multilingual support.
  • Native 2K output with flexible aspect ratios, no upscaling step.
  • Layout control and complex scenes with 50+ distinct elements.
  • Three rendering modes (TURBO, BALANCED, QUALITY) to trade speed for fidelity.
  • Prompt expansion for richer detail, plus seed control for reproducibility.

Best Use Cases

Ideogram 4.0 excels at design-led work: posters, flyers, album and book covers, social ads, logos, packaging mockups, and any composition where typography must be spelled correctly and placed deliberately. In testing, a poster prompt with a bold title and a subtitle rendered both lines cleanly and legibly in a single pass — a task that trips up most general image models. It is equally capable of photorealistic scenes, product shots, and editorial illustration, making it a versatile choice for brand and content teams.

Prompt Tips and Output Quality

Put the exact words you want rendered inside quotation marks, and keep text strings short for the cleanest results. Use QUALITY mode for final, text-heavy designs and TURBO for quick drafts. Prompt expansion adds richer detail but can occasionally reword or recase your text, so disable it when wording must stay exact. Describe layout, color palette, and style explicitly for design work; fix the seed when you need to reproduce a result.

FAQs

Does Ideogram 4.0 render text accurately? Yes — it ranks first among image models for typography in blind designer evaluations.

What resolution does it output? Native 2K, up to 2048 px per side, with flexible aspect ratios.

Is it good at multiple languages? Yes, it offers strong multilingual text rendering across scripts.

Can it handle complex, multi-element scenes? Yes — it maintains accuracy across compositions with 50 or more elements.

How do I keep my text exactly as written? Quote the text and turn off prompt expansion to prevent casing or wording changes.

Which mode should I use? QUALITY for final design output, TURBO for fast iteration, BALANCED as a middle ground.