Simon Willison’s Weblog: gpt-image-1-mini

Source URL: https://simonwillison.net/2025/Oct/6/gpt-image-1-mini/#atom-everything
Source: Simon Willison’s Weblog
Title: gpt-image-1-mini

Feedly Summary: gpt-image-1-mini
OpenAI released a new image model today: gpt-image-1-mini, which they describe as “A smaller image generation model that’s 80% less expensive than the large model."
They released it very quietly – I didn’t hear about this in the DevDay keynote but I later spotted it on the DevDay 2025 announcements page.
It wasn’t instantly obvious to me how to use this via their API. I ended up vibe coding a Python CLI tool for it so I could try it out.
I dumped the plain text diff version of the commit to the OpenAI Python library titled feat(api): dev day 2025 launches into ChatGPT GPT-5 Thinking and worked with it to figure out how to use the new image model and build a script for it. Here’s the transcript and the the openai_image.py script it wrote.
I had it add inline script dependencies, so you can run it with uv like this:
export OPENAI_API_KEY="$(llm keys get openai)"
uv run https://tools.simonwillison.net/python/openai_image.py "A pelican riding a bicycle"

It picked this illustration style without me specifying it:

(This is a very different test from my normal "Generate an SVG of a pelican riding a bicycle" since it’s using a dedicated image generator, not having a text-based model try to generate SVG code.)
My tool accepts a prompt, and optionally a filename (if you don’t provide one it saves to a filename like /tmp/image-621b29.png).
It also accepts options for model and dimensions and output quality – the –help output lists those, you can see that here.
OpenAI’s pricing is a little confusing. The model page claims low quality images should cost around half a cent and medium quality around a cent and a half. It also lists an image token price of $8/million tokens. It turns out there’s a default "high" quality setting – most of the images I’ve generated have reported between 4,000 and 6,000 output tokens, which costs between 3.2 and 4.8 cents.
One last demo, this time using –quality low:
uv run https://tools.simonwillison.net/python/openai_image.py \
‘racoon eating cheese wearing a top hat, realistic photo’ \
/tmp/racoon-hat-photo.jpg \
–size 1024×1024 \
–output-format jpeg \
–quality low

This saved the following:

And reported this to standard error:
{
"background": "opaque",
"created": 1759790912,
"generation_time_in_s": 20.87331541599997,
"output_format": "jpeg",
"quality": "low",
"size": "1024×1024",
"usage": {
"input_tokens": 17,
"input_tokens_details": {
"image_tokens": 0,
"text_tokens": 17
},
"output_tokens": 272,
"total_tokens": 289
}
}

This took 21s, but I’m on an unreliable conference WiFi connection so I don’t trust that measurement very much.
272 output tokens = 0.2 cents so this is much closer to the expected pricing from the model page.
Tags: python, tools, ai, openai, generative-ai, uv, text-to-image, pelican-riding-a-bicycle, vibe-coding

AI Summary and Description: Yes

Summary: OpenAI has quietly launched a new image generation model called gpt-image-1-mini, which is significantly cheaper than its predecessor. The text discusses practical programming experiences with the model via a Python CLI tool, demonstrating its features, usage, and costs. This development is noteworthy for professionals in AI and generative AI security, as it highlights advancements in AI capabilities and pricing structures.

Detailed Description: The text details the release of OpenAI’s new model, gpt-image-1-mini, emphasizing its affordability and practical applications. Here’s a closer look at its components and significance:

– **Model Overview**:
– The gpt-image-1-mini is described as an image generation model that is 80% less costly than the larger version, making it more accessible for development and experimentation.

– **Development Insights**:
– The author created a Python Command Line Interface (CLI) tool to facilitate interaction with the new API due to initial ambiguities surrounding its use.

– **Functionality**:
– The CLI tool allows users to generate images based on prompts, support customization through filename and image quality options, and specify dimensions.
– It provides various capabilities including output format selection (JPEG) and image quality settings.

– **Performance and Pricing**:
– The cost structure is briefly discussed, indicating low, medium, and high-quality options with corresponding token costs.
– For instance, high-quality images lead to costs between 3.2 to 4.8 cents per image, showcasing the model’s potential cost efficiency.

– **Example Usage**:
– The text provides practical examples of invoking the image generation process, illustrating how to save results, manage image outputs, and report generation times.

– **Implications for AI Security**:
– This advancement in generative AI models could pose new security concerns, including misuse for generating deceptive content and the need for safeguards in deployment.

Overall, this release underscores the ongoing evolution within AI and generative AI, indicating significant implications for security and compliance as organizations adopt such tools for diverse applications. It also presents a crucial reminder for professionals to incorporate security and ethical considerations into AI development practices.