GPT Image 2
gpt_image_2
AI-powered image generation model with improved quality and creative capabilities.
Endpoints
Section titled “Endpoints”POST /v1/queue/gpt_image_2 # Create taskGET /v1/queue/gpt_image_2/requests/{request_id}/status # Check statusGET /v1/queue/gpt_image_2/requests/{request_id}/response # Get resultPUT /v1/queue/gpt_image_2/requests/{request_id}/cancel # Cancel taskRequest parameters
Section titled “Request parameters”curl --location "https://cloud.seaart.ai/model/v1/queue/gpt_image_2" \ --header "Authorization: Bearer YOUR_API_KEY" \ --header "Content-Type: application/json" \ --data '{ "prompt": "A clean product photo of a red apple on a white table, soft studio lighting.", "n": 1, "size": "1024x1024", "quality": "medium", "output_format": "jpeg", "output_compression": 90, "moderation": "auto" }'Text description of the desired image, with a maximum length of 32000 characters.
Number of images to generate.
Range: 1 - 10
Default: 1
Generated image size.
Supports auto, common fixed sizes such as 1024x1024, 1024x1536, and 1536x1024, or a custom WIDTHxHEIGHT value that satisfies GPT Image 2 size constraints.
Custom size requirements: width and height must both be multiples of 16; aspect ratio must not exceed 3:1; the longest side must not exceed 3840px; total pixels must be between 655360 and 8294400.
Default: auto
Image quality level.
Options: low, medium, high, auto
Default: auto
Returned image format.
Options: png, jpeg, webp
Default: png
Output compression level. Only applies when output_format is jpeg or webp. For example, output_compression=50 compresses the output image by 50%.
Range: 0 - 100
Default: 100
Content moderation strictness.
Options: auto, low
Default: auto
Unique identifier representing the end user.
Response parameters
Section titled “Response parameters”{ "request_id": "mmsu_01hxyz...", "response_url": "https://cloud.seaart.ai/model/v1/queue/gpt_image_2/requests/mmsu_01hxyz.../response", "status_url": "https://cloud.seaart.ai/model/v1/queue/gpt_image_2/requests/mmsu_01hxyz.../status", "cancel_url": "https://cloud.seaart.ai/model/v1/queue/gpt_image_2/requests/mmsu_01hxyz.../cancel", "queue_position": 0}| Field | Type | Description |
|---|---|---|
request_id | string | Task ID used for all follow-up operations. |
response_url | string | URL to fetch the final result. |
status_url | string | URL to query task status. |
cancel_url | string | URL to cancel the task. |
queue_position | int | Current queue position. |