The GPT Image 2.6 Flare Text To Image API generates images from a text prompt and supports fast iteration.
taskId.Enum: application/json
Bearer authentication token. Example: Bearer {{APIKey}}.
The text description of the image to generate or edit.
Output width in pixels. Default value: 1024.
Output height in pixels. Default value: 1024.
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.
The number of images to generate in a single request. Must be between 1 and 10. Default value: 1.
Returns 0 for success, or a specific error code.
Returns "success" or a descriptive error message.
The unique identifier for the task. Use this ID with the Polling API to retrieve the generated images.
Use the Polling API to retrieve the processing results.
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.
{
"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
}
}
}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{
"code": 0,
"message": "success",
"data": {
"taskId": "API-dc41a2a79afa41feb5a755f6176e808c"
}
}