Referencev1.0.0 Stable

AI Image 2 API

Integrate GPT Image 2.0 image generation and reference-based editing. This documentation covers authentication, the generate and status endpoints, request limits, and billing.

https://gptimage2-ai.com
01

Quick Start

Complete your first API call in just two steps: submit a generation task, then poll for status.

1

Submit Task

Send a POST request to the generate endpoint to get a Task ID.

2

Query Status

Use the Task ID to check progress until you get the image URL.

02

Authentication

Note: Please keep your API Key secure and do not expose it in client-side code.

HTTP Header
Authorization: Bearer {YOUR_API_KEY}
POST
https://gptimage2-ai.com/api/generate

Create a new image generation or reference-edit task. This endpoint is asynchronous and returns a task_id plus initial status; call /api/status to retrieve the final images.

This endpoint responds immediately with task_id. Poll /api/status until the status becomes SUCCESS to obtain image URLs.

Body Parameters

Parameter NameTypeRequiredDescription
promptstringConditionalText prompt describing the image to create (max 20000 characters). Required when images is empty.
imagesstring[]NoOptional array of reference image URLs for editing or recombination instead of pure text-to-image.
aspect_ratiostringNoOutput aspect ratio. Allowed values: auto, 1:1, 5:4, 9:16, 21:9, 16:9, 4:3, 3:2, 4:5, 3:4, 2:3.
resolutionstringNoOutput resolution: 1K (default), 2K, or 4K. 5:4 and 4:5 only support 1K; 1:1 does not support 4K.
Response (JSON)
{
  "code": 200,
  "message": "success",
  "data": {
    "task_id": "task_1234567890",
    "status": "IN_PROGRESS"
  }
}
GET
https://gptimage2-ai.com/api/status

Query the execution status and results of a task.

Query Parameters

Parameter NameRequiredDescription
task_idYesThe ID returned when submitting the task.
Response Example
{
  "code": 200,
  "message": "success",
  "data": {
    "status": "SUCCESS",
    "task_id": "xxxxxxxx",
    "request": {
      "prompt": "A beautiful sunset over mountains",
      "aspect_ratio": "16:9"
    },
    "response": [
      "https://cdn.example.com/images/task_xxx_0"
    ],
    "consumed_credits": 10,
    "created_at": "2025-12-05 13:05:09",
    "error_message": null
  }
}

Billing

Cost per image

10 credits / image

Failed tasks are not charged. Other models on this site use their own credit rates.

Error Handling

  • 401 UnauthorizedInvalid API Key
  • 402 Payment RequiredInsufficient balance
  • 429 Too Many RequestsRate limit triggered
03

About GPT Image 2.0

GPT Image 2.0 is the image model that powers AI Image 2. AI Image 2 is an independent service and is not affiliated with, endorsed by, or sponsored by OpenAI.

GPT Image 2.0 — prompt-accurate generation with readable in-image text

GPT Image 2.0 follows detailed instructions closely, renders legible text inside images, and accepts reference photos so you can edit an existing picture instead of starting from nothing.

Built for typography, layouts, and reference edits

The model holds up on posters, infographics, and UI mockups where words must stay readable, and it preserves a subject across style or background changes when reference images are provided.

What it is good at

  • Readable in-image text — renders headlines, labels, and short slogans inside posters and infographics.
  • Reference-based editing — pass one or more image URLs to restyle or recompose an existing photo while keeping the subject.
  • Structured layouts — handles multi-element compositions such as menus, flyers, and storyboards with ordered panels.
  • 1K to 4K output — choose 1K, 2K, or 4K; 4K is unavailable at 1:1, and 5:4 / 4:5 only render at 1K.
  • Eleven aspect ratios — auto, 1:1, 5:4, 9:16, 21:9, 16:9, 4:3, 3:2, 4:5, 3:4, and 2:3.
  • Flat pricing — every image costs 10 credits, charged only when the task succeeds.

How to use

  • promptprompt – natural-language description; include the exact words you want rendered (max 20000 characters).
  • imagesimages – optional array of reference image URLs; the model edits or recombines them.
  • resolutionresolution – 1K (default), 2K, or 4K; every size costs the same 10 credits.

© 2026 AI Image 2. All rights reserved.