GPT Image 2.6 Flare

POSThttps://api.newportai.com/api/async/gpt_image_2.6/flare/text_to_image

The GPT Image 2.6 Flare Text To Image API generates images from a text prompt and supports fast iteration.

  • Submit a POST request to the GPT Image 2.6 Flare Text To Image API to obtain a taskId.
  • Submit a POST request to the Polling API to retrieve the generated images.
  • Configure a Callback URL to receive results automatically on completion.

Request Headers

Content-Type string Required

Enum: application/json

Authorization string Required

Bearer authentication token. Example: Bearer {{APIKey}}.

Request Body

prompt string Required

The text description of the image to generate or edit.

width integer Optional

Output width in pixels. Default value: 1024.

height integer Optional

Output height in pixels. Default value: 1024.

quality string Optional

The quality level of the generated image. Enum: low, medium, high, xhigh, max. auto is not supported. Lower quality generates faster results with fewer USD. Default value: low.

n integer Optional

The number of images to generate in a single request. Must be between 1 and 10. Default value: 1.

Response

code integer

Returns 0 for success, or a specific error code.

message string

Returns "success" or a descriptive error message.

data object
taskId string

The unique identifier for the task. Use this ID with the Polling API to retrieve the generated images.

Errors

10192Illegal param

Polling

Use the Polling API to retrieve the processing results.

Callback

Alternatively, you can enable Callback to receive task results automatically upon completion.

The imageType field describes the image encoding. PNG files may be served from a URL ending in .jpg with an image/jpeg response header.

0Task Completed
{
    "code": 0,
    "message": "success",
    "data": {
        "images": [
            {
                "imageUrl": "https://dreamapi-rs-aigc.newportai.com/dreamapi/o/2026-11-24/a4e91eee3a664587ab945f3a6cfe22e9.jpg",
                "imageType": "png"
            }
        ],
        "task": {
            "taskId": "API-dc41a2a79afa41feb5a755f6176e808c",
            "status": 3,
            "errorCode": 0,
            "reason": "ok",
            "taskType": "gpt_image_2.6/flare/text_to_image",
            "executionTime": 11780,
            "expire": 1795503359190
        }
    }
}
Request
cURL
curl -X POST 'https://api.newportai.com/api/async/gpt_image_2.6/flare/text_to_image' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {{key}}' \
  -d @- <<'JSON'
{
  "prompt": "A sea otter sitting on a rock in sunlight, photorealistic"
}
JSON
0Successful
{
    "code": 0,
    "message": "success",
    "data": {
        "taskId": "API-dc41a2a79afa41feb5a755f6176e808c"
    }
}