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 const axios = require('axios'); const api_key = "YOUR API-KEY"; const url = "https://api.segmind.com/v1/ideogram-txt-2-img"; const data = { "magic_prompt_option": "AUTO", "negative_prompt": "low quality,blurry", "prompt": "A cinematic black and white medium shot of Albert Einstein in a lab. He is writing a text and looking at the blackboard. The text on the blackboard says 'Stay calm and use Segmind'. The background is filled with scientific equipment.", "resolution": "RESOLUTION_1024_1024", "seed": 56698, "style_type": "GENERAL" }; (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


magic_prompt_optionenum:str ( default: AUTO )

Option for magic prompt

Allowed values:


negative_promptstr ( default: 1 )

Negative prompt to avoid specific elements


promptstr *

Prompt to render


resolutionenum:str ( default: RESOLUTION_1024_1024 )

Resolution of the output image

Allowed values:


seedint ( default: 1 )

Seed for random generation

min : 1,

max : 99999


style_typeenum:str ( default: GENERAL )

Style type for the output

Allowed values:

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 Text to Image

Ideogram is a cutting-edge AI tool designed to transform your ideas into stunning visuals in a matter of seconds. With its advanced capabilities, Ideogram excels at creating captivating designs, realistic images, innovative logos, and posters. Ideogram is a powerful tool for artists, designers, and anyone seeking to bring their imagination to life. With its advanced features and exceptional performance, it's a valuable asset for creative professionals.

Key Features of Ideogram Text to Image

  • Versatile Image Generation: Ideogram's powerful AI engine allows you to create a vast array of visuals, catering to diverse artistic preferences and project requirements. Whether you envision realistic photo-quality images, abstract expressions, or anime-inspired illustrations, Ideogram's versatility ensures your creative vision is brought to life.

  • Enhanced Text Rendering: Need images with crisp, clear text? Ideogram excels in this area, making it ideal for graphic design elements like greeting cards, t-shirts, and posters. The generated text is not only legible but also visually appealing, enhancing the overall aesthetic of your designs.

  • Customization Options: Take control of your creations with Ideogram's extensive customization options. Choose from a variety of styles, including General, Realistic, Design, 3D, and Anime, to match your desired aesthetic. Experiment with different color palettes to set the mood or maintain brand consistency. Adjust the image weight to influence how much the original image affects the generated output.

  • Magic Prompt: Ideogram's Magic Prompt feature acts as your personal AI assistant, interpreting and optimizing your prompts to deliver exceptional results. It understands your instructions, refines your prompts, and generates images that align closely with your vision.

  • High-Quality Outputs: Create images that are visually stunning and suitable for various purposes. Ideogram offers different resolutions, allowing you to select the level of detail required for your project. Whether you need high-resolution images for print or web-optimized visuals, Ideogram delivers quality results.

  • Ideogram consistently outperforms leading competitors like Flux Pro and DALL·E 3 in human evaluations. This means you can expect exceptional results and a superior user experience.

Use Cases

  • Generate initial sketches and ideas for movies, games, and animations.

  • Create unique and visually appealing characters for stories, comics, or games.

  • Design new products or improve existing ones with innovative visuals.

  • Generate logos, posters, social media graphics, and other marketing materials.

  • Create illustrations for books, magazines, and websites

  • Create visually striking campaigns to attract customers.

  • Design logos, branding elements, and marketing materials consistent with a brand's image.