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/p-image-ideogram";
const data = {
"prompt": "A typographic travel poster for the French Riviera, bold retro lettering, sun-bleached pastel palette",
"thinking": "high",
"image_size": "1K",
"aspect_ratio": "1:1",
"prompt_upsampling": true,
"output_format": "jpg",
"output_quality": 80,
"seed": 42
};
(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);
}
})();Text or JSON describing your image. Put on-image words in quotes for accurate text.
Reasoning level trading speed for quality. Use high at 2K for text, low for drafts.
Allowed values:
Resolution tier; 2K roughly quadruples 1K pixels. Pick 2K for crisp text and fine detail.
Allowed values:
Output shape; choose custom to set exact size. Use 9:16 for stories, 16:9 for banners.
Allowed values:
Custom width in pixels, 256-2560 and multiple of 16. Needs aspect ratio custom.
min : 256,
max : 2560
Custom height in pixels, 256-2560 and multiple of 16. Needs aspect ratio custom.
min : 256,
max : 2560
Auto-expands short prompts into richer detail. Disable to pass your raw prompt unchanged.
Image file format. Use png for lossless, jpg or webp for smaller files.
Allowed values:
Compression quality 0-100 for jpg and webp; ignored for png. Use 80-100 for sharp output.
min : 0,
max : 100
Seed for reproducible results. Fix a number to repeat, use -1 for random.
min : -1,
max : 999999999999999
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.
Pruna P Image Ideogram (P-Image-Ideogram) is a text-to-image model from Pruna AI, built in collaboration with Ideogram, that turns a text prompt into a high-quality image in under a second. Its signature feature is a single thinking control with four levels — very low, low, medium, and high — that lets you dial the exact trade-off between speed and quality from one endpoint. It inherits Ideogram's category-leading strength in rendering readable, correctly spelled text inside images, making it a practical choice for design-driven work rather than art alone.
thinking quality levels from one API, tuning speed versus detail.high at 2K for crisp text.P-Image-Ideogram fits fast, high-volume creative production. Use it for marketing graphics, paid social and ad creative, YouTube thumbnails, event posters, packaging and product mockups, lookbook covers, and editorial layouts where headlines and labels must be legible. Photorealism holds up for beauty, fashion, food and beverage, automotive, travel, and interior moodboards. Run very low or low for drafts and A/B testing, then switch to high at 2K for brand-critical final assets.
Put exact on-image text in quotes and keep it short — single words or 2 to 4 word phrases render most reliably. Match the level to the prompt: low for simple ideas, medium for everyday production, high for complex or text-heavy layouts. On vague prompts, high can add unrequested detail, so prefer low or medium there. For precise layouts, send a JSON prompt with high_level_description and bounding boxes. Keep prompt_upsampling on to enrich short prompts, or disable it to pass raw prompts unchanged.
How do I get accurate text in images?
Wrap the text in quotes, keep it short, and use thinking: high at image_size: 2K.
Which thinking level should I choose? Low for simple prompts, medium as an everyday default, high for detailed or text-critical work.
Does it support JSON prompts? Yes. Structured JSON with hex colors and element bounding boxes gives precise control over text and object placement.
What resolutions and aspect ratios are supported? 1K and 2K, with 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, and custom sizing.
How do custom dimensions work?
Set aspect_ratio to custom, then provide width and height between 256 and 2560 as multiples of 16.
Is it good for stylized, non-photoreal art? Photorealism and typography are its strengths; heavily stylized or illustrative looks are still improving.