Skip to content

GPT Image 2.5 ​

Use gpt-image-2.5-flare or gpt-image-2.5-sunburst with the OpenAI-compatible Images API to generate images. Model availability depends on your account access.

Endpoint and Models ​

http
POST /v1/images/generations
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
modelDescription
gpt-image-2.5-flareFlare model
gpt-image-2.5-sunburstSunburst model

Request Parameters ​

ParameterRequiredDescription
modelYesOne of the model IDs above
promptYesDescription of the image to generate
sizeNoOutput dimensions in WIDTHxHEIGHT format, for example 1024x1024
qualityNoauto, low, medium, or high; if omitted, the model chooses
nNoNumber of images to generate; the example uses 1

The standard Images API uses size for dimensions, not resolution, aspect_ratio, or image_size. GPT Image models return base64-encoded images; do not send response_format.

cURL Example ​

Change model to gpt-image-2.5-sunburst to use Sunburst.

bash
curl -X POST https://cubicspaces.cloud/v1/images/generations \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "gpt-image-2.5-flare",
    "prompt": "A small blue circle centered on a plain white background",
    "size": "1024x1024",
    "quality": "low",
    "n": 1
  }'

Response Shape ​

json
{
  "created": 1780000000,
  "data": [
    { "b64_json": "iVBORw0KGgo..." }
  ],
  "usage": {
    "input_tokens": 18,
    "output_tokens": 196,
    "output_tokens_details": { "image_tokens": 196 }
  }
}

Read and base64-decode data[0].b64_json to get the image. usage reports token usage for this request; values vary by request. For reference-image editing, upload an image file to /v1/images/edits. Do not send image_urls to the generation endpoint.