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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 const axios = require('axios'); const FormData = require('form-data'); const api_key = "YOUR API-KEY"; const url = "https://api.segmind.com/v1/ideogram-character"; const reqBody = { "prompt": "a close up photo of a woman in a fashion magazine photoshoot", "resolution": "512x1536", "style_type": "Realistic", "aspect_ratio": "16:9", "rendering_speed": "Quality", "magic_prompt_option": "Off", "character_reference_image": "https://segmind-resources.s3.amazonaws.com/output/9ad9b775-7b35-4485-affe-6215a933d825-686185927069985948.png" }; (async function() { try { const formData = new FormData(); // Append regular fields for (const key in reqBody) { if (reqBody.hasOwnProperty(key)) { formData.append(key, reqBody[key]); } } // Convert and append images as Base64 if necessary const response = await axios.post(url, formData, { headers: { 'x-api-key': api_key, ...formData.getHeaders() } }); console.log(response.data); } catch (error) { console.error('Error:', error.response ? error.response.data : error.message); } })();
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


maskstr ( default: 1 )

Use a mask to preserve parts of the image while inpainting. Choose a detailed mask for precise edits.


seedint ( default: 1 )

Set a seed for reproducible results. Use a fixed seed for consistency across generations.


imagestr ( default: 1 )

Provide an image for inpainting using the given mask. Start with a clear, high-resolution image for best results.


promptstr *

Describe the image you want to create. Use creative prompts for unique images.


resolutionenum:str ( default: 512x1536 )

Choose resolution for the image output. For detailed images, pick a higher resolution.

Allowed values:


style_typeenum:str ( default: Realistic )

Select the style for the image. Use 'Fiction' for creative artwork or 'Realistic' for lifelike images.

Allowed values:


aspect_ratioenum:str ( default: 16:9 )

Define the aspect ratio for your image. Choose a ratio like '16:9' for wide-screen images.

Allowed values:


rendering_speedenum:str ( default: Quality )

Choose rendering speed for processing time. Use 'Turbo' for fast results or 'Quality' for best results.

Allowed values:


magic_prompt_optionenum:str ( default: Off )

Toggle magic prompt modes to automate text prompts. Use 'On' for automatic prompt enhancements.

Allowed values:


character_reference_imagestr *

Provide an image as a character reference. Use a clear headshot for accurate modeling.

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 Character – AI Character Consistency Model

What is Ideogram Character?

Ideogram Character is a specialized AI model engineered for perfect character consistency across multiple image generations. Using just a single reference image, this model generates high-quality character variations while maintaining remarkable visual fidelity to the original subject. Whether working with real people or fictional characters, developers can create unlimited headshots and character portrayals with consistent facial features, expressions, and styling.

The model integrates seamlessly with existing creative workflows, supporting both API integration and direct platform usage for scalable character generation tasks.

Key Features

Single-reference consistency – Maintains character accuracy using only one input image • Dual rendering modes – Choose between "Turbo" for speed or "Quality" for maximum fidelity
Flexible aspect ratios – Support for 25+ aspect ratios from 1:3 to 16:9 • Style control – Toggle between "Realistic" and "Fiction" rendering styles • Magic prompt enhancement – Automatic prompt optimization for better results • Inpainting capabilities – Edit specific image regions using mask-based controls • Reproducible outputs – Seed parameter for consistent generation results

Best Use Cases

Content Creation: Generate character variations for storytelling, comics, and digital narratives without hiring multiple models or artists.

Game Development: Create consistent NPC appearances across different scenes and contexts while maintaining character recognition.

Marketing & Advertising: Produce diverse headshots and character representations for campaigns requiring consistent brand personas.

E-learning & Training: Develop character-driven educational content with reliable visual consistency across modules.

Prompt Tips and Output Quality

Write descriptive prompts that focus on scene, lighting, and context rather than facial features – the model handles character consistency automatically. For example: "professional headshot in office setting, soft lighting" works better than describing facial characteristics.

Use the magic_prompt_option set to "On" for automatic prompt enhancement when starting out. The style_type parameter significantly impacts output: choose "Realistic" for photographic quality or "Fiction" for artistic interpretations.

Higher resolutions (1024x1024+) provide better detail retention, especially for facial features. Set rendering_speed to "Quality" for final outputs and "Turbo" for rapid prototyping.

FAQs

Is Ideogram Character open-source?
No, Ideogram Character is a proprietary model available through Ideogram's platform and API services.

How does it differ from other character generation models?
Unlike general text-to-image models, Ideogram Character specializes in maintaining perfect character consistency across generations using minimal reference input.

What image formats work best for character references?
Clear headshots in common formats (JPEG, PNG, WebP) with good lighting and facial visibility produce optimal results.

What resolution should I use for production work?
For professional applications, use 1024x1024 or higher. The model supports resolutions up to 1536x640 depending on your aspect ratio needs.

Can I control facial expressions and poses?
Yes, describe desired expressions and poses in your text prompt while the model maintains underlying character features from your reference image.

How do I achieve reproducible results?
Set a specific seed value in the parameters. Using the same seed with identical prompts and settings will generate consistent outputs.