ChatGPT Image 2.5
Overview
ChatGPT Image 2.5 supports text-to-image generation and image editing with up to 10 reference images. Use Flare for fast everyday generation or Sunburst for detail-sensitive editing while keeping the same model ID.
Test API KEY: key_00000000000000000000000000000000Endpoints
1. Create Task
Request
POST https://api.pixwithapi.online/api/task/createHeaders
| Header | Value | Required |
|---|---|---|
| Content-Type | application/json | Yes |
| Api-Key | {API_KEY} | Yes |
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| prompt | string | Yes | A non-empty prompt describing the image to generate or edit. |
| image_urls | array | Conditional | Provide 1-10 images for image-to-image mode. Omit for text-to-image mode. |
| model_id | string | Yes | 0-90 |
| options | object | No | Generation options. |
| options.prompt_optimization | boolean | No | Translate and optimize the prompt before generation. Default: false. |
| options.mode | string | No | Generation mode. Valid values: 'Flare', 'Sunburst' (case-insensitive). Default: 'Flare'. |
| options.aspect_ratio | string | No | Output aspect ratio. Valid values: 'Auto', '1:1', '16:9', '9:16', '4:3', '3:4', '3:2', '2:3', '5:4', '4:5', '21:9'. Default: 'Auto'. |
| options.resolution | string | No | Output resolution. Valid values: '1K', '2K', '4K'. Default: '1K'. |
model_id remains 0-90 for both modes. When image_urls is present, Pixwith automatically routes the request to image-to-image generation.
Example Request - Text-to-Image
{
"prompt": "A warm reading corner beside a rainy window, cinematic lighting",
"model_id": "0-90",
"options": {
"prompt_optimization": true,
"mode": "flare",
"aspect_ratio": "16:9",
"resolution": "2K"
}
}Example Request - Image-to-Image
{
"prompt": "Keep the product and packaging text, replace the background with a soft studio setting",
"image_urls": [
"https://cdn.pixwithapi.online/example-product.jpg",
"https://cdn.pixwithapi.online/example-setting.jpg"
],
"model_id": "0-90",
"options": {
"prompt_optimization": true,
"mode": "Sunburst",
"aspect_ratio": "1:1",
"resolution": "2K"
}
}Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | int | 1=success, 0=error |
| message | string | Success and failure messages. |
| data | object | Task data. |
| data.task_id | string | Task identifier. |
| data.estimated_time | int | Estimated time in seconds. |
Response
{
"code": 1,
"message": "success",
"data": {
"task_id": "d425ab4dc256f0ebaa84862b9cea8a3d",
"estimated_time": 100
}
}Last updated on