Skip to main content
GPT Image 2 is OpenAI’s next-generation image generation model, available through the Starrise AI API. Built on an autoregressive + reasoning hybrid architecture, it supports native 2K resolution, near-perfect text rendering (~99% character-level accuracy across 12+ languages), and excellent multi-object scene composition.

Key Capabilities

  • Text-to-image — Generate images from natural language descriptions
  • Image editing — Edit existing images using text prompts via /v1/images/edits
  • Flexible resolution — Supports arbitrary custom dimensions up to 4K (3840px), sides must be multiples of 16
  • Precise text rendering — ~99% character-level accuracy across 12+ languages
  • Multi-object composition — Complex scenes without occlusion or misalignment
  • Multi-style — Photorealistic, illustration, anime, vector, 3D, data visualization
For both /v1/images/generations and /v1/images/edits, n supports 1–10, default 1. Requires selecting the Direct group in the console.

Output Specs

Quick Example

Parameters

Image Editing

Edit existing images via POST /v1/images/edits. Request body uses multipart/form-data; images are uploaded as files. Up to 16 input images per request (image[]).

Input Image Formats

Supported formats: PNG, JPEG. Images must be submitted via multipart/form-data file upload. Two available model IDs:
  • gpt-image-2 — Official model
  • gpt-image-2-c — Cost-effective version (supports response_format)
Note: When using gpt-image-2-c, selecting higher quality may affect stable output for n images. For stable multi-image generation, lower quality is recommended.

Edit Endpoint Parameters

image and image[] are mutually exclusive and cannot be used together.

Mask Editing

Provide a mask image with an Alpha channel to control which regions of the source image are edited. Pixels where Alpha is white (opaque) are preserved; pixels where Alpha is black (transparent) will be edited. Requirements:
  • Mask must contain an Alpha channel
  • Must match the source image in format and dimensions exactly
  • File size limit: < 50MB
Mask editing and the n parameter both require selecting the Direct group in the console.
cURL
If the mask is a black-and-white image without an Alpha channel, convert it first:
Python

Generation API Reference

Interactive Playground for POST /v1/images/generations.

Edit API Reference

Interactive Playground for POST /v1/images/edits.