Model IDDocumentation Index
Fetch the complete documentation index at: https://docs.gmicloud.ai/llms.txt
Use this file to discover all available pages before exploring further.
gpt-image-2-generate API Usage Guide
Overview
gpt-image-2-generate is OpenAI’s latest text-to-image model. It excels at following complex prompts, rendering accurate text within images, and producing photorealistic outputs across a wide range of styles.Authentication
Submit Image Generation Request
Endpoint
Request Format
Request Parameters
| Parameter | Type | Required | Description | Default | Constraints |
|---|---|---|---|---|---|
model | string | Yes | Model identifier | - | Must be "gpt-image-2-generate" |
payload.prompt | string | Yes | Text description of the image to generate | - | - |
payload.size | string (enum) | No | Dimensions of the generated image | "1024x1024" | "1024x1024", "1024x1536", "1536x1024" |
payload.quality | string (enum) | No | Image quality level, affects detail and cost | "medium" | "low", "medium", "high", "auto" |
payload.n | integer | No | Number of images to generate | 1 | Min: 1, Max: 10 |
payload.output_format | string (enum) | No | File format of the generated image | "png" | "png", "jpeg" |