GPT Image 2.5 Flare Edit
Model ID openai/gpt-image-2.5-flare/edit
Overview
Image editing from 1 to 16 reference images, with an optional mask and transparent-background output.
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
| Parameter | Type | Required | Nullable | Default | Constraints | Description |
|---|---|---|---|---|---|---|
model | string | Yes | No | - | values: openai/gpt-image-2.5-flare/edit | Model ID used to route the request. |
prompt | string | Yes | No | - | - | Text prompt, up to 32000 characters. |
images | array | Yes | No | - | min_items: 1; max_count: 16; accepts: URL, Base64 data, asset:// reference | Source images; each entry accepts a URL, Base64 data, or asset:// reference. |
mask | string | No | No | - | accepts: URL, Base64 data, asset:// reference | Optional mask URL, Base64 data, or asset:// reference. Transparent pixels mark the region to replace; dimensions must match the first source image. |
size | string | No | No | `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_format | string | No | No | `png` | values: png, jpeg, webp | Output file format. |
n | integer | No | No | `1` | range: 1-10 | Number of images generated by one task. |
quality | string | No | No | `medium` | values: auto, low, medium, high, xhigh, max | Image rendering quality tier. |
background | string | No | No | `auto` | values: auto, opaque, transparent | Generated image background type. |
moderation | string | No | No | - | values: auto, low | Content 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.
images
Type: array · Required: Yes · Nullable: No
Source images; each entry accepts a URL, Base64 data, or asset:// reference.
mask
Type: string · Required: No · Nullable: No
Optional mask URL, Base64 data, or asset:// reference. Transparent pixels mark the region to replace; dimensions must match the first source image.
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-flare/edit",
"prompt": "A cinematic camera movement through a forest",
"images": ["https://example.com/reference.jpg"]
}'JSON
{
"model": "openai/gpt-image-2.5-flare/edit",
"prompt": "A cinematic camera movement through a forest",
"images": ["https://example.com/reference.jpg"]
}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.