1️⃣ gpt-image-1 API
OpenAI’sgpt-image-1
image generation API offers both text-to-image generation and image-to-image editing with text guidance capabilities.Before using this API, please ensure you have the latest OpenAI package installed by running
pip install -U openai
.
Important Notes
- Once an API call is sent, you will be charged regardless of any interruptions or failures during the generation process
- Names of living artists (such as “Hayao Miyazaki”, “Makoto Shinkai”, etc.) will trigger a
moderation_blocked
error, causing generation to fail. You can work around this by using non-sensitive terms like “Ghibli” or “bright modern Japanese anime style” instead. The same applies to images with revealing clothing or suggestive content. - Generally, referencing “styles” is safer than naming “artists” - for example, “Pixar” is supported.
- A more reliable approach is to use deceased artists or their corresponding styles, such as “Van Gogh” or “Mona Lisa”
Model and Pricing
Model | Quality | 1024x1024 | 1024x1536 | 1536x1024 |
---|---|---|---|---|
gpt-image-1 | low | $0.011 | $0.016 | $0.016 |
gpt-image-1 | medium | $0.042 | $0.063 | $0.063 |
gpt-image-1 | high | $0.167 | $0.25 | $0.25 |
Note: The input text tokens are billed separately at $5 per million tokens.
API Usage
Endpoints- Image generation:
https://aihubmix.com/v1/images/generations
- Image editing:
https://aihubmix.com/v1/images/edits
Output Examples
Rejection Scenarios
Error message when a request is rejected:moderation_blocked
error will be thrown in multi-image generation.
Therefore, it’s recommended to proactively avoid potential intellectual property (IP) or copyright issues to minimize the risk of system rejection and ensure smooth generation.
✍️ Key recommendations:
- Avoid direct use of copyrighted characters, logos, celebrity likenesses, etc.
- Consider using “style inspiration”, “creative reinterpretation”, or “generalized descriptions” instead
- If referencing specific elements, check whether they fall within the public domain
Practical Tips
- Supports all languages. Chinese text works reliably, though we don’t recommend generating large amounts of text in any language
- The size parameter doesn’t support explicitly passing size=“auto” - auto is the default
- Aspect ratios can be specified in the prompt (supports 2:3, 3:2, 1:1) or set via the size parameter
- The
moderation
parameter controls sensitivity, but even with it set to “low,” requests might still be rejected (e.g., if Venus is too revealing) - The edits endpoint doesn’t support the
moderation
parameter - Combining text descriptions with reference images produces more accurate results
- Compressing uploaded images as pre-processing can improve speed
- Transparent backgrounds are supported (no need for manual cutouts) — just add this requirement to your prompt
2️⃣ GPT Image (Reverse)
To meet the strong expectations of our users, we have specially launched two reverse-engineered interfaces:gpt-4o-image
and gpt-4o-image-vip
. The VIP model offers superior performance and stability.Please note that reverse-engineered interfaces cannot guarantee full stability and may encounter
🕐 Queuing...
status or generation failures. They are recommended only for trial experiences and functional testing.OpenAI’s official interface
gpt-image-1
has been released. Considering the cost of usage, the current reverse-engineered interfaces will be temporarily retained, with compatible calling methods provided for everyone.
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
Model | Price ($/IMG) |
---|---|
gpt-4o-image-vip | $0.009 |
gpt-4o-image | $0.005 |
Due to the rising maintenance costs of reverse-engineered interfaces, the price per call has been increased.
(Updated on: 2025-06-04).
Python Example
Using the familiarv1/completions
endpoint, we provide support, which is fully compatible. For specific usage, please refer to:
Output Example
Compatibility with Official OpenAI API
If you prefer using the latest image generation method released by OpenAI, you can refer to the following implementation. Just keep these 3 points in mind:- Do not include the
quality
parameter — models likegpt-4o-image-vip
andgpt-4o-image
have it bundled internally. - The
usage
field (token tracking) is not supported. - The latest output returns Base64-encoded image data, and the current script already handles automatic saving.
Python
Effect Demonstration
Girl with a Pearl Earring
- The famous painting is reinterpreted, with text and watermark directly output.

Pixar
- The Pixar 3D Cartoon style, stable as ever.

Ghibli
- 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.