Skip to main content

Available Model List

Gemini series is not supported. For Gemini series, please refer to: https://docs.aihubmix.com/en/api/Gemini-Guides

OpenAI Models

  • gpt-image-1.5 - OpenAI’s latest image generation model, featuring improved instruction adherence and prompt execution capabilities.
  • gpt-image-1 - A multimodal language model that accepts text and image inputs, generating image outputs.
  • gpt-image-1-mini - An economical version of gpt-image-1.
  • dall-e-3 - Capable of creating realistic images and artworks based on natural language descriptions, supporting the creation of new images in specified dimensions based on prompts.

Imagen Models

  • imagen-4.0-ultra-generate-001
  • imagen-4.0-generate-001
  • imagen-4.0-fast-generate-001
  • imagen-4.0-fast-generate-preview-06-06
  • imagen-3.0-generate-002

Qwen Models

  • qwen-image - A foundational image generation model in the Qwen series that has made significant progress in complex text rendering and precise image editing.
  • qwen-image-edit - Qwen image editing model.

Doubao Models

  • doubao-seedream-4-5 - ByteDance’s latest multimodal image model, integrating capabilities for text-to-image, image-to-image, and composite image outputs.
  • doubao-seedream-4-0 - ByteDance’s SOTA multimodal image creation model, supporting diverse functionalities such as multi-image fusion creation, image editing, and composite image generation.

Flux Models

  • flux-2-flex - Designed for real-world creative production workflows, generating high-quality images while maintaining character and style consistency among multiple references.
  • flux-2-pro - An image generation and editing model developed by Black Forest Labs, supporting complex text reading and writing.
  • FLUX.1-Kontext-pro - A multimodal flow matching model developed by Black Forest Labs, supporting both text-to-image generation and image editing in context.

iRAG Models

  • irag-1.0 - Baidu’s self-developed image generation model capable of producing ultra-realistic images.
  • ernie-irag-edit - Baidu’s self-developed image editing model, supporting operations like erase, repaint, and variation based on images.

Ideogram Models

  • V3 - Ideogram AI’s image generation model, capable of quickly generating images.

API Interface

Request URL

POST https://aihubmix.com/v1/models/<model_path>/predictions
<model_path> is <provider/model_id>, for example, <openai/gpt-image-1.5>, <qianfan/qwen-image>.

Request Headers

Authorization: Bearer $AIHUBMIX_API_KEY
Content-Type: application/json

Request Parameters

General Parameters

ParameterTypeRequiredDescription
promptstringYesPrompt words
sizestringNoImage size, supports 1K (not supported in Doubao-4-5 series), 2K, 4K, auto (default). Qwen series supports: 512*1024, 768*512, 768*1024, 1024*576, 576*1024, 1024*1024 (default)
imagestringNoReference image path
nintegerNoNumber of images to generate, supports 1-10, default is 1
qualitystringNoRendering quality, supports low, medium, and high; higher quality takes longer time

OpenAI Model Parameters

ParameterTypeRequiredDescription
input_fidelitystringNoFidelity, supports high and low (default)
moderationstringNoContent moderation strictness, supports auto (default, standard filtering) and low (less filtering), not supported in image-to-image mode
output_formatstringNoOutput image format, supports png, jpeg

Flux Model Parameters

ParameterTypeRequiredDescription
safety_toleranceintegerNoAudit leniency, higher values indicate more leniency. Range 0<=x<=5, default value is 2
aspect_ratiostringNoDesired aspect ratio for the image, supports 16:9 (default), 1:1, 4:3
seedintegerNoRandom number seed
rawbooleanNoWhether to enable raw mode for a more natural visual effect, default false

Qwen Model Parameters

ParameterTypeRequiredDescription
watermarkbooleanNoWhether to add a watermark to the generated image, supports true (default) and false
seedintegerNoRandom number seed, range [0,2147483647]

Doubao Model Parameters

ParameterTypeRequiredDescription
sequential_image_generationstringNoControl whether to disable composite image functionality
sequential_image_generation_optionsobjectNoComposite image configuration, effective only when sequential_image_generation is auto. Currently supports max_images, range [1, 15], default value is 15
watermarkbooleanNoWhether to add a watermark to the generated image, supports true (default) and false
seedintegerNoRandom number seed, range [-1, 2147483647], default value is -1
response_formatstringNoReturn format for the generated image, supports url (link valid for 24 hours after image generation, please download promptly) or base64_json
The actual number of images that can be generated is influenced not only by max_images but also by the number of reference images provided. The number of input reference images + the final number of generated images ≤ 15.

Usage Examples

OpenAI

curl https://aihubmix.com/v1/models/openai/gpt-image-1.5/predictions \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer sk-***" \
    -d '{
  "input": {
    "prompt": "A deer drinking in the lake, Sakura petals falling, green and clean water, japanese temple, dappled sunlight, cinematic lighting, expansive view, peace",
    "size": "1024x1024", 
    "n": 1,
    "quality": "high",
    "moderation": "low",
    "background": "auto"
  }
}'

Google Imagen

curl https://aihubmix.com/v1/models/google/imagen-4.0-fast-generate-001/predictions \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer sk-***" \
    -d '{
  "input": {
    "prompt": "A deer drinking in the lake, Sakura petals falling, green and clean water, japanese temple, dappled sunlight, cinematic lighting, expansive view, peace",
    "numberOfImages": 1
  }
}'

Qwen

curl https://aihubmix.com/v1/models/qianfan/qwen-image/predictions \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer sk-***" \
  -d '{
    "input": {
      "prompt": "A beautiful sunset over a calm ocean",
      "refer_image": "",
      "n": 1,
      "size": "1024x1024",
      "watermark": false
    }
  }'

Doubao

curl https://aihubmix.com/v1/models/doubao/doubao-seedream-4-0/predictions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-***" \
  -d '{
    "input": {
      "prompt": "Interstellar, black hole, a vintage train bursting out of a black hole, vying for visual impact, cinematic blockbuster, apocalyptic feel, dynamic, contrasting colors, oc rendering, ray tracing, motion blur, depth of field, surrealism, deep blue, the scene is shaped by delicate rich color layers creating the subject and scene, realistic texture, the lighting effects of a dark background create an atmosphere, combining artistic fantasy, exaggerated wide-angle perspective, glare, reflection, extreme light and shadow, strong gravity, devouring",
      "size": "2K",
      "sequential_image_generation": "disabled",
      "stream": false,
      "response_format": "url",
      "watermark": true
    }
  }'

Flux

  • flux-2-flex and flux-2-pro are asynchronous endpoints, requiring a two-step request. This series is extremely fast, almost instantaneous.
  • FLUX.1-Kontext-pro uses a general interface, providing a one-step process.

FLUX One-Step Drawing

curl https://aihubmix.com/v1/images/generations \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer sk-***" \
    -d '{
  "model": "FLUX.1-Kontext-pro",
  "prompt": "a cat in the garden, cute cartoon",
  "safety_tolerance": 6
}' \
| jq -r '.data[0].b64_json' \
| base64 -D > "$HOME/Desktop/image_extract.png"

Flux Asynchronous Drawing

Step 1: Send Drawing Request
curl https://aihubmix.com/v1/models/bfl/flux-kontext-max/predictions \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer sk-***" \
    -d '{
  "input": {
    "prompt": "A deer drinking in the lake, Sakura petals falling, green and clean water, japanese temple, dappled sunlight, cinematic lighting, expansive view, peace. reference style as the given image:",
    "aspect_ratio": "2:3",
    "safety_tolerance": 6
  }
}'
Output result example:
{
  "output": [
    {
      "taskId": "api.us1.***",
      "polling_url": "https://api.us1.bfl.ai/v1/get_result?id=f9821dbf-f134-41c2-aaa8-5405fb665c76"
    }
  ]
}
Step 2: Get Generated Image Link
Get Image
curl https://api.aihubmix.com/v1/tasks/<taskId> \
    -H "Authorization: Bearer sk-***" \
    -X GET

Ideogram V3

  1. Versions below V3 (V_2, V_1, etc.) are old interfaces and are not supported.
  2. The returned links require a proxy network to access.
curl https://aihubmix.com/v1/models/ideogram/V3/predictions \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer sk-***" \
    -d '{
  "input": {
    "prompt": "A deer drinking in the lake, Sakura petals falling, green and clean water, japanese temple, dappled sunlight, cinematic lighting, expansive view, peace, in the style of Pixar 3D",
    "rendering_speed": "QUALITY",
    "aspect_ratio": "2x1"
  }
}'

iRAG

curl https://aihubmix.com/v1/models/qianfan/irag-1.0/predictions\
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer sk-***" \
  -d '{
    "input": {
      "prompt": "A beautiful sunset over a calm ocean",
      "refer_image": "",
      "n": 1,
      "size": "1024x1024",
      "guidance": 7.5,
      "watermark": false
    }
  }'