Skip to Content
Image ModelsChatGPT Image 2

ChatGPT Image 2

Overview

ChatGPT Image 2 is now live on Pixwith.AI with notably stronger instruction fidelity on complex prompts, cleaner in-image text rendering, and more stable detail/identity preservation during edits.

Test API KEY: key_00000000000000000000000000000000

Endpoints

1. Create Task

Request

POST https://api.pixwithapi.online/api/task/create

Headers

HeaderValueRequired
Content-Typeapplication/jsonYes
Api-Key{API_KEY}Yes

Request Parameters

ParameterTypeRequiredDescription
promptstringYesThe input prompt (e.g., “a cinematic portrait”)
image_urlsarrayConditionalProvide 1-6 images for image-to-image mode. Omit for text-to-image mode.
model_idstringYes0-50
optionsobjectYesConfiguration options for the task
options.prompt_optimizationbooleanYesIf true, all prompt words will be automatically translated into English.
options.aspect_ratiostringNoOutput aspect ratio. Default: '16:9'. Valid values: 'Auto', '1:1', '9:16', '16:9', '4:3', '3:4'.
options.resolutionstringNoOutput resolution. Default: '1K'. Valid values: '1K', '2K', '4K'.

Limits

  • Image-to-image supports up to 6 input images.
  • Auto aspect ratio supports only 1K resolution.
  • 1:1 aspect ratio supports 1K and 2K resolution, but not 4K.
  • Other supported aspect ratios support 1K, 2K, and 4K.

Example Request - Text-to-Image (0-50)

{ "prompt": "a cinematic portrait with dramatic rim lighting", "model_id": "0-50", "options": { "prompt_optimization": true, "aspect_ratio": "16:9", "resolution": "1K" } }

Example Request - Image-to-Image (0-50)

{ "prompt": "blend these references into a single clean product hero shot", "image_urls": [ "https://cdn.pixwithapi.online/example-1.jpg", "https://cdn.pixwithapi.online/example-2.jpg" ], "model_id": "0-50", "options": { "prompt_optimization": true, "aspect_ratio": "16:9", "resolution": "2K" } }

Response Parameters

ParameterTypeDescription
codeint1=success, 0=error
messagestringSuccess and failure messages
dataobject
data.task_idstring
data.estimated_timeintEstimated time in seconds

Response

{ "code": 1, "message": "success", "data": { "task_id": "d425ab4dc256f0ebaa84862b9cea8a3d", "estimated_time": 30 } }
Last updated on