⌘K

GPT Image 1.5

gpt_image_1_5

GPT Image 1.5 is an enhanced AI-powered image generation model with improved quality and creative capabilities.

Authentication

authorization string required

All APIs require authentication via Bearer Token.

Get API Key:

Visit API Key Management Page to get your API Key

Usage:

Add to request header:

Authorization: Bearer YOUR_API_KEY

Parameters

model string required

Model ID to use for the request

Options: gpt_image_1_5


prompt string required

Text description of the desired image(s), maximum length 32000 characters


size string

Size of the generated image

Options: 1024x1024, 1024x1536, 1536x1024, auto

Default: auto


n integer

Number of images to generate

Range: 1 - 4

Default: 1


quality string

Image quality level

Options: low, medium, high, auto

Default: auto


Polling

Since result generation takes time, you need to poll the task status after creating the task.

The initial response only returns information such as the task ID and initial status. The final result must be obtained by polling the task status endpoint using the task ID.

See the examples on the right for polling requests and responses.

Response Format

error object

Error information, only present when status is failed

code string

Error code

message string

Detailed error message


output array

Generation results, only present when status is completed

content array

List of generated content

type string

Resource type, e.g., image

url string

Generated content URL


usage object

Usage statistics, only present when status is completed

cost string

Total cost in USD

discount number

Discount amount


metadata object

Metadata information


Error Codes

Error CodeDescription
014002095Internal generation error
014002096Result parsing error
014002097HTTP error response
014002099Sync generation error