We use cookies. Cookies and browser storage keep you signed in and remember your preferences. With your permission we also measure how the site is used. You can any time. See our cookie policy.

OpenAI: GPT Image 2

openai/gpt-image-2
ImageInput: text · image400KAdded Jun 24, 2026

Try OpenAI: GPT Image 2 now

Runs on your balance at the prices above. New accounts start with free usage.

Sign in to use thisCreate free account
Results will appear here.
5 of 5 free messages left today. A free account adds free usage and an API key.Create free accountSign inSession cost $0.00

OpenAI: GPT Image 2 at a glance

  • Input price is 60% higher than the median of 21 Image models.
  • Context window of 400,000 tokens, enough for long documents and multi-turn conversations.
  • Supports structured JSON output with a schema.

About OpenAI: GPT Image 2

GPT Image 2 is an image generation model from OpenAI, listed on api14 under the model id openai/gpt-image-2. It sits in the image category, and OpenAI describes it as its latest image generation model, supporting high fidelity image generation and editing. If your application needs to produce or modify images rather than text, this is the model family to look at first.

The model accepts text and image inputs and returns images as its only output modality. That combination is what makes editing possible: you can send a prompt on its own, or pair a prompt with reference images to guide the result. The context window is 400,000 tokens, with a maximum output of 360,000 tokens. Generation is controlled through a set of image parameters. Aspect ratio can be set to 1:1, 3:2, 2:3, 4:3, 3:4, 16:9, 9:16, 21:9 or auto. Quality accepts auto, low, medium or high. Background accepts auto or opaque. You can request between 1 and 10 images per call with n, supply between 0 and 16 input references, and set output compression anywhere from 0 to 100.

Those capabilities point to a fairly wide set of practical uses. Text to image generation covers marketing assets, app and web artwork, concept exploration and placeholder or production imagery. Because the model also takes image inputs, editing workflows fit naturally: restyling an existing asset, adjusting a composition, or producing variations that stay close to a supplied reference. The input_references parameter, which allows up to 16 images, suits tasks where several source images need to inform a single result, such as combining elements from multiple references. The n parameter helps when you want several candidates in one request, and the aspect ratio and quality settings let you match output to a specific slot in a layout, from square social formats to wide 21:9 banners.

You call the model through api14's OpenAI-compatible API using the model id openai/gpt-image-2, so existing OpenAI client libraries and request shapes generally carry over. The supported parameters are max_tokens, response_format, seed and structured_outputs, alongside the image parameters described above: aspect_ratio, quality, background, n, input_references and output_compression. The seed parameter is useful when you need reproducible results across runs, and response_format lets you control how the image data comes back. Because the interface is OpenAI-compatible, switching to this model from another OpenAI image model is mostly a matter of changing the model id and adjusting parameters.

One thing to keep in mind is the output modality. GPT Image 2 returns images only, so it is not the right choice when you need text completions, chat responses, or any other text output; a text model fits those cases better. Within image work, the parameter ranges define the boundaries: at most 10 images per request, at most 16 input references, and quality and compression values limited to the listed options. If your task falls inside those bounds, this model covers both generation and editing through a single endpoint.

How to call the OpenAI: GPT Image 2 API

  1. Create an API key in your dashboard.
  2. Install the official openai SDK for your language.
  3. Set baseURL to https://api14.com/api/v1 and model to "openai/gpt-image-2".
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api14.com/api/v1",
  apiKey: process.env.API14_API_KEY,
});

const result = await client.images.generate({
  "model": "openai/gpt-image-2",
  "prompt": "A minimalist product photo of a ceramic mug on a wooden table",
  "n": 1,
  "aspect_ratio": "1:1"
});
import { writeFile } from "node:fs/promises";
await writeFile("image.png", Buffer.from(result.data[0].b64_json, "base64"));

Supported parameters

max_tokensresponse_formatseedstructured_outputs

Specifications

Context length
400,000
Max output
360,000
Input
text, image
Output
image

Requests on api14 · last 7 days

10-1610-1710-1810-1910-2010-2110-22

OpenAI: GPT Image 2: frequently asked questions

How much does the OpenAI: GPT Image 2 API cost?
OpenAI: GPT Image 2 costs Input $28.00 / 1M tokens. It is charged from your USD balance only for successful requests; failed requests are free.
What is the context window of OpenAI: GPT Image 2?
OpenAI: GPT Image 2 reads up to 400,000 tokens per request: prompt, history and documents together. It writes up to 360,000 output tokens per response.
What can OpenAI: GPT Image 2 do?
OpenAI: GPT Image 2 accepts text, image and returns image. It supports structured JSON output.
How do I call OpenAI: GPT Image 2 from my code?
Point any OpenAI SDK at https://api14.com/api/v1 and set the model to "openai/gpt-image-2". No other code changes. Copy a ready example from the code panel on this page.
What are alternatives to OpenAI: GPT Image 2?
Comparable Image models at a similar price: OpenAI: GPT Image 2.5 Sunburst, OpenAI: GPT Image 2.5 Flare, Krea: K3 Edit. Each runs through the same API key, so switching is one string.

OpenAI: GPT Image 2 community

New topic

This community has no topics yet. Open the first one about OpenAI: GPT Image 2.