OpenAI: GPT Image 2
openai/gpt-image-2
Access GPT Image 2 AI image generation using Puter.js API.
Get StartedModel Card
GPT Image 2 is OpenAI's state-of-the-art image generation and editing model, released in April 2026 as the successor to GPT Image 1.
It accepts both text and image inputs, enabling generation from prompts as well as editing of existing images. The model is particularly strong at rendering text within images — signs, UI elements, labels, and multi-word strings — which was a persistent weakness in prior OpenAI image models. It also supports non-Latin scripts including Japanese, Korean, Chinese, Hindi, and Bengali.
GPT Image 2 outputs up to 2K resolution, supports flexible image sizes, and can generate multiple images from a single prompt. It features a December 2025 knowledge cutoff and built-in reasoning capabilities. Ideal for developers building visual content pipelines, localized marketing assets, infographics, or UI mockups at scale.
Cost Per Image $0.0059
per generation
Configuration N/A
resolution
Release Date Apr 21, 2026
Code Example
Use GPT Image 2 in your app with the Puter.js AI API — no API keys or setup required.
// npm install @heyputer/puter.js
import { puter } from '@heyputer/puter.js';
puter.ai.txt2img("A serene mountain landscape at sunset", {
model: "openai/gpt-image-2"
}).then(image => {
document.body.appendChild(image);
});
<html>
<body>
<script src="https://js.puter.com/v2/"></script>
<script>
puter.ai.txt2img("A serene mountain landscape at sunset", {
model: "openai/gpt-image-2"
}).then(image => {
document.body.appendChild(image);
});
</script>
</body>
</html>
More AI Models From OpenAI
GPT-6 Astra
GPT-6 Astra is OpenAI's most capable model, released in September 2026 as the successor to GPT-5.6 Sol. It targets complex reasoning, coding, computer use, research, and document creation, taking text and image input over a 1,050,000-token context window and supporting tool calling. OpenAI reports Astra saturates FrontierMath Tier 4 at 97.6% and ARC-AGI-3 at 99.9%, and cuts its hallucination rate from 92% to 51% at max effort versus GPT-5.6 Sol. It is the first OpenAI model to reach the Critical cybersecurity level under OpenAI's Preparedness Framework, scoring 100% on ExploitBench versus 78.5% for GPT-5.6 Sol. Independent testing from Artificial Analysis puts Astra's Intelligence Index at 61.2, roughly level with GPT-5.6 Sol and behind Claude Fable 5.1's 65.7. Input costs $5 per million tokens and output $25 per million, 2.5 times GPT-5.6 Sol's rate.
ChatGPT-6 Astra Pro
GPT-6 Astra Pro is OpenAI's higher-performance configuration of GPT-6 Astra, offered in ChatGPT to Pro, Business, and Enterprise subscribers. OpenAI has not published what separates it from the base model, whether a higher reasoning-effort ceiling, more compute per response, or fewer usage limits. It shares the same 1,050,000-token context window, 128,000 max output tokens, and $10/$50 per million token input/output pricing as base GPT-6 Astra. That overlap suggests Pro may simply be a higher-effort configuration of the same underlying model, a pattern also seen with GPT-5.6 Sol Pro. Base GPT-6 Astra supports adjustable reasoning effort from low to max, function calling, and image input, with an April 30, 2026 knowledge cutoff. It scores 67 on the Coding Agent Index and 61 on the Intelligence Index, near GPT-5.6 Sol and a few points behind Claude Fable 5.1. Whether these figures apply to the Pro configuration specifically is undocumented.
ChatGPT-5.6 Sol
GPT-5.6 Sol is OpenAI's flagship model in the GPT-5.6 family, sitting above Terra and Luna as the most capable and most expensive of the three. It reached general availability on July 9, 2026. Sol is built for agentic coding, cybersecurity research, and long-horizon autonomous work. OpenAI reports it sets a new state of the art on Terminal-Bench 2.1, a benchmark for command-line workflows that require planning, iteration, and tool coordination, and describes it as the most capable model yet for cybersecurity tasks such as vulnerability research. The GPT-5.6 family adds a max reasoning effort setting, an ultra mode that coordinates subagents on complex tasks, and Programmatic Tool Calling in the Responses API. Sol carries a 1.05M token context window, 128,000 max output tokens, and a February 16, 2026 knowledge cutoff, making it best suited for teams that need the highest available capability and can absorb its premium per-token cost.
Frequently Asked Questions
You can access GPT Image 2 by OpenAI through Puter.js AI API. Include the library in your web app or Node.js project and start making calls with just a few lines of JavaScript — no backend and no configuration required.
Yes, it is free if you're using it through Puter.js. With the User-Pays Model, you can add GPT Image 2 to your app at no cost — your users pay for their own AI usage directly, making it completely free for you as a developer.
| Price | |
|---|---|
| Per image | $0.0059 |
GPT Image 2 was created by OpenAI and released on Apr 21, 2026.
Yes — the GPT Image 2 API works with any JavaScript framework, Node.js, or plain HTML through Puter.js. Just include the library and start building. See the documentation for more details.
Get started with Puter.js
Add GPT Image 2 image generation to your app without worrying about API keys or setup.
Read the Docs View Tutorials