Skip to main content

OpenAI GPT Image 2

Text-to-image generation with three cost/quality tiers and unusually reliable prompt following, including legible text rendered inside the image.
GPT Image 2 is a text-to-image API that turns a written prompt into one or more images. Built on OpenAI’s GPT Image 2 model, it is chosen mainly for two things: it follows long, specific prompts closely, and it renders readable text inside the image — labels, signage, UI copy, packaging — which most diffusion models struggle with. A quality parameter selects the tier, so you can iterate cheaply and then re-run the same prompt at higher quality. To edit an existing image instead of generating from scratch, see GPT Image 2 Edit.

Key capabilities

  • Three quality tiers: quality accepts low, medium and high. The tier changes both the render quality and the credit cost of the request, so the same prompt can be drafted cheaply and finalised at high
  • Batch generation: request up to 10 images in a single call with num_images. Each image in the batch is billed
  • Prompt adherence: follows long, multi-clause prompts including counts, spatial relationships and negations more closely than typical diffusion models
  • In-image text: renders legible words and short phrases inside the image, which makes it suitable for mockups, posters and packaging
  • Async processing: every request returns a task ID immediately. Poll the task endpoint or supply webhook_url to be notified on completion

Use cases

  • Marketing and advertising: on-brand key visuals where the headline or product name has to be readable inside the image
  • Packaging and print mockups: labels, boxes and signage that need real text rather than text-shaped noise
  • Product and UI concepting: interface screens, dashboards and device mockups with legible captions
  • Editorial illustration: article and newsletter art generated from a detailed brief
  • Content pipelines at scale: batch up to 10 variants per prompt at low, review, then re-render the winner at high

Generate images with GPT Image 2

Submit a prompt to create a generation task. The API responds with a task ID; collect the result by polling or via webhook.

POST /v1/ai/text-to-image/gpt-image-2

Create a new image generation task

GET /v1/ai/text-to-image/gpt-image-2

List all GPT Image 2 tasks with status

GET /v1/ai/text-to-image/gpt-image-2/{task-id}

Get task status and results by ID

Parameters

Pricing

The quality tier sets the price per image and resolution multiplies it: Every image in num_images is billed, so a 4k request for 4 images costs twelve times a single 1k image of the same quality tier. The endpoint reference pages above are generated from the OpenAPI specification and are the authoritative, complete parameter list.

Frequently Asked Questions

GPT Image 2 is a text-to-image API powered by OpenAI’s GPT Image 2 model. You submit a text prompt and receive a task ID immediately. Poll the task endpoint or configure a webhook to receive the generated images when processing completes.
quality selects one of three tiers — low, medium or high. A higher tier spends more compute per image, which improves detail and text fidelity, and costs more credits per image. low is intended for fast iteration, high for final assets.
Up to 10, via num_images. Every image in the batch is billed at the tier you selected, so a request for 10 images at high costs ten times a single high image.
Yes — reliable in-image text is its main differentiator over most diffusion models. Short, specific strings (a product name, a headline, a button label) work best. Long paragraphs of body copy are still unreliable in any current image model.
GPT Image 2 generates a new image from a text prompt alone. GPT Image 2 Edit takes one or more existing images plus a prompt and returns a modified version, for retouching, object changes and style edits. Both share the same three quality tiers and the same batch limit.
Rate limits depend on your subscription tier. See Rate Limits for current limits.
Cost per image depends on the quality tier you request. See the Pricing page for current rates and subscription options.

Best practices

  • Tier the workflow: draft at quality: "low", review, then re-run the winning prompt at quality: "high". The prompt does not need to change
  • Batch deliberately: num_images is billed per image. Batch at low for exploration, generate single images at high
  • Write text explicitly: put the exact string you want rendered in quotes inside the prompt, and keep it short
  • Be specific: GPT Image 2 rewards long, concrete prompts — subject, composition, lighting, camera, style — more than keyword lists
  • Production integration: use webhook_url instead of polling for scalable applications
  • Error handling: implement retry logic with exponential backoff for 503 errors
  • GPT Image 2 Edit: edit existing images with the same model and quality tiers
  • Nano Banana Pro: Google Gemini image generation, also strong at in-image text
  • Seedream 5 Pro: high-resolution text-to-image with a generate and edit split
  • FLUX.2 Pro: photorealistic generation with fine-grained resolution control