GPT Image 2 is OpenAI's image generation model, released 2026-06, built for high-fidelity generation and editing through the Images API.
Channels
Every channel serves the same model, but they differ in price and stability. On each API key in the Platform, you pick a primary and a backup channel per vendor, and each billing line shows which channel served the request.
Context pricing
This model’s price depends on how much input context a request carries. The headline price is the cheapest band, and a longer prompt moves the whole request into a higher one.
Capabilities
Parameters
Request parameters this model accepts through the API.
Quick start
POST /v1/images/generations/import os from openai import OpenAI client = OpenAI( base_url="https://api.mirapi.ai/v1", # changed api_key=os.environ["MIRAPI_API_KEY"], # changed ) img = client.images.generate( model="gpt-image-2", prompt="A red bicycle leaning on a white wall", n=1, size="1024x1024", ) # img.data[0].b64_json — or .url, depending on the model
import OpenAI from "openai"; const client = new OpenAI({ baseURL: "https://api.mirapi.ai/v1", // changed apiKey: process.env.MIRAPI_API_KEY, // changed }); const img = await client.images.generate({ model: "gpt-image-2", prompt: "A red bicycle leaning on a white wall", n: 1, size: "1024x1024", });
curl https://api.mirapi.ai/v1/images/generations/ \ -H "Authorization: Bearer $MIRAPI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-image-2", "prompt": "A red bicycle leaning on a white wall", "n": 1, "size": "1024x1024" }'
Links
1M free tokens to start, no card required. It’s OpenAI-compatible, so you only change the base URL.