🎨 Interface Description: Supports Ideogram AI drawing interface with strong text-to-image capabilities, including generate, remix, edit, upscale, and describe functionalities.

  • Remix: Create new images based on a reference image and prompt.
  • Edit: Make local edits to specific areas of a reference image using prompts and masks.
  • Upscale: Enhance low-resolution images to high-resolution, with control over similarity and detail levels.
  • Describe: Reverse-engineering prompts to describe images.

Supported Styles:

  • AUTO: Default automatic selection
  • GENERAL: General purpose
  • REALISTIC: Realistic
  • DESIGN: Design-oriented
  • RENDER_3D: 3D rendering
  • ANIME: Anime style
  1. Available through the official AiHubMix API or Cherry Studio APP. Note that currently a proxy is required for image generation; direct connection within China will be supported in the future.
  2. Cherry Studio currently only offers the Ideogram drawing (generate) interface.

Generate

POST https://aihubmix.com/ideogram/generate
Synchronously generates images based on given prompts and optional parameters. Image links have a limited validity period; if you want to keep the images, you must download and save them.

Request Parameters

image_request
object
required

Request object for image generation

image_request.prompt
string
required

Prompt for image generation

image_request.aspect_ratio
string
default:"ASPECT_1_1"

Aspect ratio for image generation, determines the resolution. Cannot be used with resolution parameter.

Available ratios:

  • ASPECT_1_1
  • ASPECT_3_1
  • ASPECT_1_3
  • ASPECT_3_2
  • ASPECT_2_3
  • ASPECT_4_3
  • ASPECT_3_4
  • ASPECT_16_9
  • ASPECT_9_16
  • SPECT_16_10
  • ASPECT_10_16
image_request.model
string
default:"V_2"

Model for generating or editing images. /generate and /remix support all model types, but /edit only supports V_2 and V_2_TURBO.

Available model versions:

  • V_1
  • V_1_TURBO
  • V_2
  • V_2_TURBO
  • V_2A
  • V_2A_TURBO
image_request.magic_prompt_option
string
default:"AUTO"

Prompt enhancement option. Available parameters: AUTO, ON, OFF

image_request.seed
integer

Random seed, range: 0-2147483647

image_request.style_type
string
default:"AUTO"

Style type used for generating images; this parameter only applies to V_2 and higher versions of the model and should not be specified in V_1 versions.

Available styles:

  • AUTO
  • GENERAL
  • REALISTIC
  • DESIGN
  • RENDER_3D
  • ANIME
image_request.negative_prompt
string

Describes what you don’t want to appear in the image. Only applicable to model versions V_1, V_1_TURBO, V_2, and V_2_TURBO. Descriptions in the prompt take precedence over descriptions in the negative prompt.

image_request.num_images
integer
default:"1"

Number of images to generate, range 1-8

image_request.resolution
string

Resolution for image generation (only applicable to model version 2.0, cannot be used with aspect_ratio), expressed as width x height. If not specified, aspect_ratio is used by default.

Example Calls

import requests
import os

url = "https://aihubmix.com/ideogram/generate"

payload = { "image_request": {
        "prompt": "3D cartoon, An adorable white owl baby with tilted head, shiny amber eyes with highlight, fluffy body, standing on a trunk with moss and lots of glowing mushrooms, Close up, cinematic lighting, low angle, deep sense of depth. The background is a magical spring landscape, cute and esthetic, huge title design \"Always curious\"", #string optional
        "negative_prompt": "blurry, bad anatomy, watermark",
        "aspect_ratio": "ASPECT_3_2",  # optional include ASPECT_1_1(Default), ASPECT_3_2, ASPECT_2_3, ASPECT_4_3, ASPECT_3_4, ASPECT_16_9, ASPECT_9_16, SPECT_16_10, ASPECT_10_16
        "model": "V_2",
        "num_images": 2, #integer optional >=1 <=8 Defaults to 1
        "magic_prompt_option": "AUTO", #string optional AUTO, ON, OFF
        #"seed": "2" #integer optional >=0 <=2147483647
        "style_type": "RENDER_3D" #string optional AUTO/GENERAL/REALISTIC/DESIGN/RENDER_3D/ANIME, only applicable to V_2 and above
    } }
headers = {
    "Api-Key": os.getenv("AIHUBMIX_API_KEY"),
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())

Response

Image(s) generated successfully.

{
  "created": "2000-01-23T04:56:07Z",
  "data": [
    {
      "prompt": "A serene tropical beach scene. Dominating the foreground are tall palm trees with lush green leaves, standing tall against a backdrop of a sandy beach. The beach leads to the azure waters of the sea, which gently kisses the shoreline. In the distance, there's an island or landmass with a silhouette of what appears to be a lighthouse or tower. The sky above is painted with fluffy white clouds, some of which are tinged with hues of pink and orange, suggesting either a sunrise or sunset.",
      "resolution": "1024x1024",
      "is_image_safe": true,
      "seed": 12345,
      "url": "https://ideogram.ai/api/images/direct/8YEpFzHuS-S6xXEGmCsf7g",
      "style_type": "REALISTIC"
    }
  ]
}

Error Codes

  • 400 : Post Generate Image Request Bad Request Error
  • 401 : Post Generate Image Request Unauthorized Error
  • 422 : Post Generate Image Request Unprocessable Entity Error
  • 429 : Post Generate Image Request Too Many Requests Error

Edit

POST https://aihubmix.com/ideogram/edit

Synchronously edits a specified image using the provided mask. The mask indicates which parts of the image should be edited, while the prompt and selected style type can further guide the editing direction. Supported image formats include JPEG, PNG, and WebP. Image links have a limited validity period; if you want to keep the images, you must download and save them.

Request Parameters

image_file
file
required

Original image file, supports JPEG, PNG, and WebP formats

mask
file
required

Mask image, must meet the following requirements:

  • Contains only black and white pixels, supports RGB, RGBA, or grayscale image formats
  • Exactly the same dimensions as the original image
  • Black areas represent parts that need to be modified, white areas represent parts that need to remain unchanged
  • Cannot be pure white
  • The modified area (black part) should occupy at least 10% of the image area
prompt
string
required

Prompt for local editing

model
string
required

Model for generating or editing images. /generate and /remix support all model types, but /edit only supports V_2 and V_2_TURBO.

Available model versions:

  • V_2
  • V_2_TURBO
magic_prompt_option
string
default:"AUTO"

Prompt enhancement option. Available parameters: AUTO, ON, OFF

num_images
integer
default:"1"

Number of images to generate, range 1-8

seed
integer

Random seed, range: 0-2147483647

style_type
string
default:"AUTO"

Style type used for generating images; this parameter only applies to V_2 and higher versions of the model.

Available styles:

  • AUTO
  • GENERAL
  • REALISTIC
  • DESIGN
  • RENDER_3D
  • ANIME

Example Calls

import requests
import os

url = "https://aihubmix.com/ideogram/eidt"

files = {
    "image_file": open('<file1>', 'rb'), #required
    "mask": "open('<file1>', 'rb')" #required
}

payload = {
    "prompt": "\"prompt\"", #required
    "model": "V_2",  #required, only supported for V_2 and V_2_TURBO.
    "magic_prompt_option": ,
    "num_images":1, #integer optional >=1 <=8 Defaults to 1
    "seed": , #integer optional >=0 <=2147483647
    "style_type":
16}
headers = {"Api-Key": os.getenv("AIHUBMIX_API_KEY")}

response = requests.post(url, data=payload, files=files, headers=headers)

print(response.json()

# close file
files["image_file"].close()
files["mask"].close()

Response

Image edits generated successfully.

{
  "created": "2000-01-23T04:56:07Z",
  "data": [
    {
      "prompt": "A serene tropical beach scene. Dominating the foreground are tall palm trees with lush green leaves, standing tall against a backdrop of a sandy beach. The beach leads to the azure waters of the sea, which gently kisses the shoreline. In the distance, there's an island or landmass with a silhouette of what appears to be a lighthouse or tower. The sky above is painted with fluffy white clouds, some of which are tinged with hues of pink and orange, suggesting either a sunrise or sunset.",
      "resolution": "1024x1024",
      "is_image_safe": true,
      "seed": 12345,
      "url": "https://ideogram.ai/api/images/direct/8YEpFzHuS-S6xXEGmCsf7g",
      "style_type": "REALISTIC"
    }
  ]
}

Error Codes

  • 400 : Post Edit Image Request Bad Request Error
  • 401 : Post Edit Image Request Unauthorized Error
  • 422 : Post Edit Image Request Unprocessable Entity Error
  • 429 : Post Edit Image Request Too Many Requests Error

Remix

POST https://aihubmix.com/ideogram/remix

Fuses the provided image with given prompts and optional parameters. Input images are cropped to the selected aspect ratio before remixing. Supported image formats include JPEG, PNG, and WebP. Image links have a limited validity period; if you want to keep the images, you must download and save them.

Request Parameters

image_request
object
required

Request to generate new images using the provided image and prompt. The provided image will be cropped to match the selected output aspect ratio.

image_request.prompt
string
required

Prompt for image generation

image_request.aspect_ratio
string
default:"ASPECT_1_1"

Aspect ratio for image generation, determines the resolution. Cannot be used with resolution parameter.

Available ratios:

  • ASPECT_1_1
  • ASPECT_3_1
  • ASPECT_1_3
  • ASPECT_3_2
  • ASPECT_2_3
  • ASPECT_4_3
  • ASPECT_3_4
  • ASPECT_16_9
  • ASPECT_9_16
  • SPECT_16_10
  • ASPECT_10_16
image_request.image_weight
integer
default:"50"

Reference image weight, range: 1-100

image_request.model
string
default:"V_2"

Model for generating or editing images. /generate and /remix support all model types, but /edit only supports V_2 and V_2_TURBO.

image_request.negative_prompt
string

Describes what you don’t want to appear in the image. Only applicable to model versions V_1, V_1_TURBO, V_2, and V_2_TURBO. Descriptions in the prompt take precedence over descriptions in the negative prompt.

image_request.magic_prompt_option
string
default:"AUTO"

Prompt enhancement option. Available parameters: AUTO, ON, OFF

image_request.num_images
integer
default:"1"

Number of images to generate, range: 1-8

image_request.resolution
string

Resolution for image generation (only applicable to model version 2.0, cannot be used with aspect_ratio), expressed as width x height. If not specified, aspect_ratio is used by default.

image_request.seed
integer

Random seed, range: 0-2147483647

image_request.style_type
string
default:"AUTO"

Style type for generated images; only applicable to V_2 and higher versions of models, should not be specified in V_1 versions.

Available styles:

  • AUTO
  • GENERAL
  • REALISTIC
  • DESIGN
  • RENDER_3D
  • ANIME
image_file
file
required

Original image file, supports JPEG, PNG, and WebP formats

Example Calls

import requests
import os

url = "https://aihubmix.com/ideogram/remix"

files = { "image_file": open('<file1>', 'rb') }
payload = {"image_request": '''{
    "prompt": "watercolor",
    "aspect_ratio": "ASPECT_10_16",
    "image_weight": 50,
    "magic_prompt_option": "ON",
    "model": "V_2"
}'''}

headers = {"Api-Key": os.getenv("AIHUBMIX_API_KEY")}

response = requests.post(url, data=payload, files=files, headers=headers)

print(response.json())

Response

Image(s) generated successfully.

{
  "created": "2000-01-23T04:56:07Z",
  "data": [
    {
      "prompt": "A serene tropical beach scene. Dominating the foreground are tall palm trees with lush green leaves, standing tall against a backdrop of a sandy beach. The beach leads to the azure waters of the sea, which gently kisses the shoreline. In the distance, there's an island or landmass with a silhouette of what appears to be a lighthouse or tower. The sky above is painted with fluffy white clouds, some of which are tinged with hues of pink and orange, suggesting either a sunrise or sunset.",
      "resolution": "1024x1024",
      "is_image_safe": true,
      "seed": 12345,
      "url": "https://ideogram.ai/api/images/direct/8YEpFzHuS-S6xXEGmCsf7g",
      "style_type": "REALISTIC"
    }
  ]
}

Error Codes

  • 400 : Post Remix Image Request Bad Request Error
  • 401 : Post Remix Image Request Unauthorized Error
  • 422 : Post Remix Image Request Unprocessable Entity Error
  • 429 : Post Remix Image Request Too Many Requests Error

Upscale

POST https://aihubmix.com/ideogram/upscale

Synchronously upscales the provided image with optional prompts. Supported image formats include JPEG, PNG, and WebP. Image links have a limited validity period; if you want to keep the images, you must download and save them.

Request Parameters

image_request
object
required

Request object for upscaling the provided image with optional prompts

image_request.prompt
string

Optional prompt to guide the upscaling process

image_request.resemblance
integer
default:"50"

Resemblance, range: 1-100

image_request.detail
integer
default:"50"

Detail, range: 1-100

image_request.magic_prompt_option
string
default:"AUTO"

Prompt enhancement option. Available parameters: AUTO, ON, OFF

image_request.num_images
integer
default:"1"

Number of images to generate, range: 1-8

image_request.seed
integer

Random seed, range: 0-2147483647

image_file
file
required

Original image file, supports JPEG, PNG, and WebP formats

Example Calls

import requests
import os

url = "https://aihubmix.com/ideogram/upscale"

files = { "image_file": open('<file1>', 'rb') }
payload = { "image_request": "{}" }
headers = {"Api-Key": os.getenv("AIHUBMIX_API_KEY")}

response = requests.post(url, data=payload, files=files, headers=headers)

print(response.json())

Response

Image(s) generated successfully.

{
  "created": "2000-01-23T04:56:07Z",
  "data": [
    {
      "prompt": "A serene tropical beach scene. Dominating the foreground are tall palm trees with lush green leaves, standing tall against a backdrop of a sandy beach. The beach leads to the azure waters of the sea, which gently kisses the shoreline. In the distance, there's an island or landmass with a silhouette of what appears to be a lighthouse or tower. The sky above is painted with fluffy white clouds, some of which are tinged with hues of pink and orange, suggesting either a sunrise or sunset.",
      "resolution": "1024x1024",
      "is_image_safe": true,
      "seed": 12345,
      "url": "https://ideogram.ai/api/images/direct/8YEpFzHuS-S6xXEGmCsf7g",
      "style_type": "REALISTIC"
    }
  ]
}

Error Codes

  • 400 : Post Upscale Image Request Bad Request Error
  • 401 : Post Upscale Image Request Unauthorized Error
  • 422 : Post Upscale Image Request Unprocessable Entity Error
  • 429 : Post Upscale Image Request Too Many Requests Error

Describe

POST https://aihubmix.com/ideogram/describe

Analyzes and describes the uploaded image. Supported image formats include JPEG, PNG, and WebP.

Request Parameters

image_file
file
required

Image file to describe, supports JPEG, PNG, and WebP formats

Example Calls

import requests
import os

url = "https://aihubmix.com/ideogram/describe"

files = { "image_file": open('<file1>', 'rb') }
headers = {"Api-Key": os.getenv("AIHUBMIX_API_KEY")}

response = requests.post(url, files=files, headers=headers)

print(response.json())

# close file
files["image_file"].close()

Response

Description(s) created successfully.

{
  "descriptions": [
    {
      "text": "A meticulously illustrated cat with striped patterns, sitting upright. The cat's eyes are a captivating shade of yellow, and it appears to be gazing intently at something. The background consists of abstract, swirling patterns in shades of black, white, and beige, creating an almost fluid or wavy appearance. The cat is positioned in the foreground, with the background elements fading into the distance, giving a sense of depth to the image."
    },
    {
      "text": "A meticulously illustrated cat with striped patterns, sitting upright. The cat's eyes are a captivating shade of yellow, and it appears to be gazing intently at something. The background consists of abstract, swirling patterns in shades of black, white, and beige, creating an almost fluid or wavy appearance. The cat is positioned in the foreground, with the background elements fading into the distance, giving a sense of depth to the image."
    }
  ]
}

Error Codes

  • 400 : Post Describe Request Bad Request Error
  • 422 : Post Describe Request Unprocessable Entity Error
  • 429 : Post Describe Request Too Many Requests Error

💰 Pricing

Image Generation

ModelFeatureCost per Image
2aText to image, or text + reference image to imageUS $0.04
2a TurboText to image, or text + reference image to image (faster but slightly lower quality)US $0.025
2.0Text to image, or text + reference image to imageUS $0.08
2.0 TurboText to image, or text + reference image to image (faster but slightly lower quality)US $0.05
1.0Text to image, or text + reference image to imageUS $0.06
1.0 TurboText to image, or text + reference image to image (faster but slightly lower quality)US $0.02

Image Editing

ModelFeatureCost per Image
2.0 EditRegenerate images using text prompts, reference images, and binary masksUS $0.08
2.0 Turbo EditRegenerate images using text prompts, reference images, and binary masks (faster but slightly lower quality)US $0.05

Image Enhancement

ModelFeatureCost per Image
UpscaleIncrease reference image resolution by 2x, possibly enhancing image qualityUS $0.06

For more details, see the official documentation