Ideogram Character

Achieve perfect character consistency across multiple generations from a single reference image.


API

If you're looking for an API, you can choose from your desired programming language.

POST
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 import requests api_key = "YOUR_API_KEY" url = "https://api.segmind.com/v1/ideogram-character" # Prepare data and files data = {} files = {} # For parameter "mask", you can send a raw file or a URI: # files['mask'] = open('IMAGE_PATH', 'rb') # To send a file data['mask'] = 'null' # To send a URI data['seed'] = None # For parameter "image", you can send a raw file or a URI: # files['image'] = open('IMAGE_PATH', 'rb') # To send a file data['image'] = 'null' # To send a URI data['prompt'] = "a close up photo of a woman in a fashion magazine photoshoot" data['resolution'] = "512x1536" data['style_type'] = "Realistic" data['aspect_ratio'] = "16:9" data['rendering_speed'] = "Quality" data['magic_prompt_option'] = "Off" # For parameter "character_reference_image", you can send a raw file or a URI: # files['character_reference_image'] = open('IMAGE_PATH', 'rb') # To send a file data['character_reference_image'] = 'https://segmind-resources.s3.amazonaws.com/output/9ad9b775-7b35-4485-affe-6215a933d825-686185927069985948.png' # To send a URI headers = {'x-api-key': api_key} # If no files, send as JSON if files: response = requests.post(url, data=data, files=files, headers=headers) else: response = requests.post(url, json=data, headers=headers) print(response.content) # The response is the generated image
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.

Resources to get you started

Everything you need to know to get the most out of Ideogram Character

How to Use This Image Generation Model Effectively

This guide covers best practices and parameter recommendations for creating stunning images—whether you need creative artwork, photorealistic renders, or character-based inpainting.

1. Crafting Your Prompt

  • •Be specific but concise.
    Example: “A serene forest glade at dawn with soft mist and sunbeams.”
  • •Include mood, lighting, and style cues.
    Example: “Hyper-realistic, cinematic lighting, autumn palette.”

2. Choosing Resolution & Aspect Ratio

  • •High Detail (Concept Art / Prints)
    Resolution: 1024Ă—1024 or higher (e.g., 1280Ă—800)
    Aspect Ratio: 16:9 or 4:3
  • •Social Media / Thumbnails
    Resolution: 640Ă—640 or 832Ă—832
    Aspect Ratio: 1:1
  • •Portraits / Character Shots
    Resolution: 768Ă—1216 or 704Ă—1280
    Aspect Ratio: 9:16 or 3:4

3. Style & Rendering Speed

  • •Realistic Photography
    style_type: Realistic
    rendering_speed: Quality
  • •Concept Art & Fantasy
    style_type: Fiction or Auto
    rendering_speed: Default or Turbo for quicker iterations

4. Magic Prompt Option

  • •On: Automatically enhances your prompt with keyword suggestions—great for newcomers.
  • •Auto: Balances your original text with AI improvements.
  • •Off: Full control; use if you have a refined prompt already.

5. Inpainting & Character Reference

  • •Provide a character_reference_image URL or upload a high-resolution headshot.
  • •Use mask to define areas you want to preserve or edit. For fine detail, draw a precise mask.
  • •Supply an image if you’re replacing or touching up specific regions.

6. Seed Control

  • •Set seed for reproducible outputs.
  • •Omit or randomize seed to explore fresh variations each run.

7. Sample Workflows

A. Quick Sketch for Approval

  • •prompt: “Minimalist line art city skyline at dusk”
  • •resolution: 512Ă—512
  • •rendering_speed: Turbo
  • •magic_prompt_option: On

B. Final Poster-Quality Render

  • •prompt: “Epic dragon soaring above misty mountains, cinematic lighting”
  • •resolution: 1280Ă—800
  • •aspect_ratio: 16:9
  • •style_type: Fiction
  • •rendering_speed: Quality
  • •seed: 42

C. Character Headshot

  • •prompt: “Portrait of a cyberpunk detective with neon reflections”
  • •character_reference_image: [Your Image URL]
  • •resolution: 768Ă—1216
  • •aspect_ratio: 9:16
  • •style_type: Realistic
  • •mask: [Your Mask URI]

Experiment with combinations to discover your ideal workflow. Adjust resolution, style, and speed based on deliverable needs. Happy creating!

Other Popular Models

Discover other models you might be interested in.

Cookie settings

We use cookies to enhance your browsing experience, analyze site traffic, and personalize content. By clicking "Accept all", you consent to our use of cookies.