AIAPIAIAPI API

GPT Image 2.5 Sunburst

Model ID openai/gpt-image-2.5-sunburst/text-to-image

Overview

Text-to-image generation with custom dimensions, quality tiers, and transparent backgrounds.

OpenAI · text-to-image

Important: Transparent backgrounds require png or webp output. Each generated image is billed separately.

Endpoint

POST /v1/images/generations/async

Authentication

Authorization: Bearer <AIAPIAIAPI_API_KEY>

Request Body

ParameterTypeRequiredNullableDefaultConstraintsDescription
modelstringYesNo-values: openai/gpt-image-2.5-sunburst/text-to-imageModel ID used to route the request.
promptstringYesNo--Text prompt, up to 32000 characters.
sizestringNoNo`1024x1024`-auto or WIDTHxHEIGHT; dimensions must be divisible by 16, aspect ratio between 1:3 and 3:1, maximum edge 3840 and maximum area 3840x2160 pixels.
output_formatstringNoNo`png`values: png, jpeg, webpOutput file format.
nintegerNoNo`1`range: 1-10Number of images generated by one task.
qualitystringNoNo`medium`values: auto, low, medium, high, xhigh, maxImage rendering quality tier.
backgroundstringNoNo`auto`values: auto, opaque, transparentGenerated image background type.
moderationstringNoNo-values: auto, lowContent moderation strictness.

model

Type: string · Required: Yes · Nullable: No

Model ID used to route the request.

prompt

Type: string · Required: Yes · Nullable: No

Text prompt, up to 32000 characters.

size

Type: string · Required: No · Nullable: No

auto or WIDTHxHEIGHT; dimensions must be divisible by 16, aspect ratio between 1:3 and 3:1, maximum edge 3840 and maximum area 3840x2160 pixels.

output_format

Type: string · Required: No · Nullable: No

Output file format.

n

Type: integer · Required: No · Nullable: No

Number of images generated by one task.

quality

Type: string · Required: No · Nullable: No

Image rendering quality tier.

background

Type: string · Required: No · Nullable: No

Generated image background type.

moderation

Type: string · Required: No · Nullable: No

Content moderation strictness.

Request Example

curl --request POST \
  --url https://aiapiaiapi.com/v1/images/generations/async \
  --header 'Authorization: Bearer $AIAPIAIAPI_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
      "model": "openai/gpt-image-2.5-sunburst/text-to-image",
      "prompt": "A cinematic camera movement through a forest"
    }'

JSON

{
  "model": "openai/gpt-image-2.5-sunburst/text-to-image",
  "prompt": "A cinematic camera movement through a forest"
}

Response

{
  "code": "success",
  "message": "",
  "data": { "task_id": "image_01K2ABC123" }
}

Task Status

Use the task_id from the create response:

GET /v1/images/generations/async/{task_id}

{
  "code": "success",
  "message": "",
  "data": {
    "task_id": "image_01K2ABC123",
    "status": "SUCCESS",
    "progress": "100%",
    "outputs": ["https://cdn.example.com/images/image_01K2ABC123.png"],
    "start_time": 1786960805,
    "finish_time": 1786960900,
    "submit_time": 1786960800,
    "fail_reason": ""
  }
}

Error Responses

Validation errors return HTTP 400 with a stable error code.

{
  "code": "unsupported_parameter",
  "message": "The parameter is not supported by this model.",
  "data": null
}

Documentation Index

Fetch the complete documentation index at:

https://aiapiaiapi.com/llms.txt

Use this file to discover all available API documentation.