Interface Description

As OpenAI has yet to officially release a GPT-4 image generation API, we’ve temporarily made two reverse-engineered endpoints—gpt-4o-image and gpt-4o-image-vip—available, enabling users to preview GPT-4o’s powerful image creation capabilities.
Please note, these reverse-engineered endpoints do not guarantee consistent stability and are intended solely for early access and exploratory use. Once OpenAI officially launches the GPT-4 image API, we will immediately discontinue these unofficial endpoints and seamlessly transition to the official stable release.

Notes

  • Special Note: Regardless of the cause, once the API call is initiated, charges will apply even if the generation fails.
  • The name of living artists (such as “Ghibli” and “Makoto Shinkai”) will trigger input_moderation error, causing generation failure. You can avoid this by using non-sensitive words like “Ghibli” and “Bright Modern Japanese Anime Style”.
  • In general, “style” is safer than “artist”, like “Pixar” is also supported.
  • A more secure approach is to use the name of deceased artists or corresponding styles, such as “Van Gogh” and “Mona Lisa”.

Model and Pricing

ModelPrice ($/IMG)
gpt-4o-image-vip$0.007
gpt-4o-image$0.003

Python Example

Using the familiar v1/completions endpoint, we provide support, which is fully compatible. For specific usage, please refer to:

from openai import OpenAI

client = OpenAI(
    api_key="AIHUBMIX_API_KEY", # Your Key Here
    base_url="https://aihubmix.com/v1"
)

# Create a chat completion request
stream = client.chat.completions.create(
    model="gpt-4o-image-vip", #list: gpt-4o-image-vip, gpt-4o-image
    messages=[
        {
            "role": "user",
            "content": [
                {
                    "type": "text",
                    "text": """Redesign [Girl wearing a pearl earring] as an anime-style illustrated cover. Preserve original essence and composition. Render in refined Kyoto Anime-inspired style—soft brushwork, cinematic lighting, progressive depth. 
Format in AV cover layout: 
Japanese-English mixed typography, serif title with significant visual hierarchy - sense of design is the key.
Extract words tha conveys profound meanings as title, then creative slogan, the original name can be a smaller information ONLY if necessary.
Subtly embed watermark “jerlin” in clothing or background. Maintain emotional tone and posture, soften only when necessary. 2:3 portrait"""
                }
            ]
        }
    ],
    stream=True
)

# Process the streaming response
for chunk in stream:
    try:
        if chunk.choices and len(chunk.choices) > 0 and chunk.choices[0].delta and chunk.choices[0].delta.content:
            print(chunk.choices[0].delta.content, end="", flush=True)
    except Exception as e:
        print(f"\nError occurred while processing the response: {str(e)}")

Output Example

{
  "prompt": "Redesign 'Girl with a Pearl Earring' as an anime-style illustrated cover. Preserve the original essence and composition: the iconic side-glance pose, serene expression, and intimate framing. Render in refined Kyoto Anime-inspired style with soft brushwork, cinematic lighting, and progressive depth. Create an AV cover layout with Japanese-English mixed typography, using a prominent serif title with strong visual hierarchy. Extract profound words for the title and include a creative slogan. The original name 'Girl with a Pearl Earring' should appear as smaller text if needed. Subtly embed the watermark 'jerlin' in clothing or background. For modesty, replace any potential nudity with flowing fabric, hair, or veils while maintaining the emotional tone and posture. Soften details only when necessary.",
  "ratio": "2:3"
}

>🕐 Queuing.

>⚡ Generating.....

>🏃‍ Progress 11....19....27...34....42....50....57...64....[100](https://videos.openai.com/vg-assets/assets%2Ftask_01jsccq77nfcsab7dn8bx7z230%2Fsrc_1.png?st=2025-04-21T13%3A08%3A48Z&se=2025-04-27T14%3A08%3A48Z&sks=b&skt=2025-04-21T13%3A08%3A48Z&ske=2025-04-27T14%3A08%3A48Z&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skoid=aa5ddad1-c91a-4f0a-9aca-e20682cc8969&skv=2019-02-02&sv=2018-11-09&sr=b&sp=r&spr=https%2Chttp&sig=xm6K6M7au3F3Vd9qcYxR3mYWrqAHsgbagbUV5GQo39w%3D&az=oaivgprodscus)

> ✅ Generation complete


![gen_01jsccq83pfg6ssfqf3pzfaytj](https://filesystem.site/cdn/20250421/XBCrAs6qvMARG7BkFX0KI3MBs1qoto.png)

[Click to download](https://filesystem.site/cdn/download/20250421/XBCrAs6qvMARG7BkFX0KI3MBs1qoto.png)

![gen_01jsccq83nf6ftmtx8y48h383y](https://filesystem.site/cdn/20250421/tQ62gh0BbdESApNmFJMNzsdUFDflkl.png)

[Click to download](https://filesystem.site/cdn/download/20250421/tQ62gh0BbdESApNmFJMNzsdUFDflkl.png)%      

Effect Demonstration

Girl-with-a-Pearl-Earring

Girl with a Pearl Earring

  1. The famous painting is reinterpreted, with text and watermark directly output.
pixar

Pixar

  1. The Pixar 3D Cartoon style, stable as ever.
ghibli

Ghibli

  1. The most popular Ghibli

Practical Tips

  • Support any language, Chinese drawing is also stable, but we don’t recommend drawing a large amount of text.
  • Specify the aspect ratio in the prompt, otherwise 4o will automatically determine it. Supports 2:3, 3:2, 1:1.
  • Give reference images if you don’t have inspiration, support single image and multi-image.
  • Upload images can be compressed for pre-processing, improve speed.
  • Support transparent background, no need to remove the background.——just add the requirement in the prompt.