English
  • 中文
  • English
English
  • 中文
  • English
官网
服务状态
English
  • 中文
  • English
  1. Images
  • Quickstart & Conventions
  • Images
    • GPT Image 2 / 2.5 / 2.6 Generation & Editing
    • Nano Banana Image Generation
    • Gemini Native Sync Image Generation
    • Seedream 5.0 Pro / 5.5 Image Generation
    • Midjourney Image Generation
  • Videos
    • Seedance 2 Video Generation
    • Omni Video Generation
    • Seedance 2.5 Video Generation
    • MiniMax H3 Video Generation
    • WAN 3.0 Video Generation
    • Muse Video Generation
    • Seedance Asset Registration
    • Gemini Omni 1.2 Flash Video Generation
    • Seedance Volcengine Native Video Generation
    • MAGI-2 Video Generation
  • Text Models
    • Claude Desktop (CC Switch) Setup Guide
    • Codex in ChatGPT Desktop Setup Guide
    • Gemini Text Models (Native Format)
    • Text & Chat APIs (OpenAI / Claude)
  • Audio
    • Gemini Text-to-Speech (TTS)
  1. Images

GPT Image 2 / 2.5 / 2.6 Generation & Editing

Generate or edit images asynchronously with the GPT Image model family. After submitting a task, save task_id and poll its status; once completed, read output URLs from images[].url.
Supported models: gpt-image-2, gpt-image-2.5-flare, gpt-image-2.5-sunburst, gpt-image-2.6-flare, and gpt-image-2.6-sunburst. All five models share identical endpoints, parameters, and task workflows; the only difference is that animated GIF output is supported exclusively on gpt-image-2.6-flare and gpt-image-2.6-sunburst.

Quick Selection#

Base URL: https://vip.brioi.com
Authentication: Authorization: Bearer YOUR_API_KEY
Image Generation
Create: POST /v1/images/async/generations
Poll: GET /v1/images/async/generations/{task_id}
Payload: JSON containing prompt and generation options.
Image Editing via URL (Recommended)
Create: POST /v1/images/async/edits
Poll: GET /v1/images/async/edits/{task_id}
Payload: JSON passing public image URLs in images.
Image Editing via Local Files
Create: POST /v1/images/async/edits
Poll: GET /v1/images/async/edits/{task_id}
Payload: multipart/form-data uploading files via image[].
Compatibility note: POST /v1/images/generations and POST /v1/images/edits are retained only for legacy callers; use the async endpoints for all new integrations.

Image Generation#

Generation Parameters#

ParameterRequiredDescription
modelYesstring; one of the supported models.
promptYesstring; image generation prompt.
sizeNostring, default auto; see Parameter Limits & Errors for custom dimensions.
qualityNostring, default auto; supports auto, high, medium, low.
nNointeger, default 1; 1 is recommended (most configurations generate 1 image per call—send concurrent requests when you need multiple images).
output_formatNostring; supports png, jpeg, webp; gpt-image-2.6-flare and gpt-image-2.6-sunburst also support gif (see Animated GIF Output).
backgroundNostring, default auto; supports auto, opaque (transparent backgrounds are not supported).
output_compressionNointeger; JPEG or WebP compression quality (0 to 100).

Generation Request Example#

Image Editing#

Edit Parameters#

Provide either image[] or images (mutually exclusive): use image[] for local file uploads and images for public image URLs.
Core Inputs
ParameterRequiredDescription
modelYesstring; one of the supported models.
promptYesstring; describe what to preserve and what to modify.
image[]Conditionalfile; used in multipart/form-data requests (upload at least 1 file; repeat the field for multiple files).
imagesConditionalarray; used in JSON requests (each element may be a URL string or { "image_url": "..." }).
Edit Controls
ParameterRequiredDescription
maskNofile or string; PNG mask image. JSON requests accept a public URL; dimensions should match the first reference image.
input_fidelityNostring; supports low, high.
backgroundNostring, default auto; supports auto, opaque (transparent backgrounds are not supported).
sizeNostring, default auto; see Parameter Limits & Errors for custom dimensions.
qualityNostring, default auto; supports auto, high, medium, low.
nNointeger, default 1; 1 is recommended.
Output Controls
ParameterRequiredDescription
output_formatNostring; supports png, jpeg, webp; gpt-image-2.6-flare and gpt-image-2.6-sunburst also support gif (see Animated GIF Output).
output_compressionNointeger; JPEG or WebP compression quality (0 to 100).

URL Edit Example (Recommended)#

Local File Upload Example#

Animated GIF Output#

Supported only on gpt-image-2.6-flare and gpt-image-2.6-sunburst. Available on both the generation and edit endpoints: pass output_format: "gif" and describe the subject, motion, and loop behavior in prompt; to animate a still reference image, pass it to the edit endpoint.
ParameterRequiredDescription
output_formatYesstring; set to gif.
frame_countNointeger, default 9; frame count (2 to 16).
frame_duration_msNointeger, default 200; per-frame duration in milliseconds (20 to 2000, rounded to 10 ms increments).
sizeNostring, default auto; dimensions of each individual frame.
Total pixels are counted across all frames combined—more frames or larger per-frame dimensions make it easier to exceed the pixel cap, which returns a parameter error. If this occurs, reduce frame_count, lower size, or set size: "auto" so the model selects frame dimensions automatically.
frame_count and frame_duration_ms apply only to GIF output; GIF does not support output_compression.
On completion, images[].mime_type is image/gif; download the full animation from images[].url.

Task Status & Results#

Creation Response
{"status":"SUBMITTED","task_id":"task_xxxxxxxxxxxxxxxxxxxxxxxx",
 "progress":"10%","images":[]}
Save task_id. A successful creation response indicates only that the task has entered processing—not that image generation has finished.
Task Statuses
Poll the corresponding GET endpoint every 3–5 seconds until a terminal status is reached:
StatusDescription
SUBMITTEDSubmitted; continue polling.
IN_PROGRESSProcessing; continue polling.
SUCCESSCompleted; read result URLs from images[].url.
FAILUREFailed; read the failure details from fail_reason.
Succeeded Result
{
  "task_id": "task_xxxxxxxxxxxxxxxxxxxxxxxx",
  "status": "SUCCESS",
  "progress": "100%",
  "images": [
    {
      "index": 0,
      "url": "https://example.com/result.png",
      "mime_type": "image/png"
    }
  ]
}
Some storage backends return application/octet-stream. Result URLs expire—download or persist output images promptly. Polling responses may also include auxiliary fields such as usage; clients should not rely on them.
Failed response example:
{
  "task_id": "task_xxxxxxxxxxxxxxxxxxxxxxxx",
  "status": "FAILURE",
  "progress": "100%",
  "fail_reason": "{\"error\":{\"code\":\"invalid_input\",\"message\":\"Invalid parameters or inaccessible input media\"}}"
}
fail_reason contains raw diagnostic text that may embed JSON fragments; do not parse it against a fixed schema.

Parameter Limits & Errors#

Image editing accepts at most 16 reference images per request.
Reference images and masks in JSON requests must be publicly accessible direct HTTPS image URLs.
background: "transparent" is not supported.
Custom size values must satisfy all of the following simultaneously:
Both width and height are multiples of 16;
Maximum edge does not exceed 3840 pixels;
Long-to-short edge ratio does not exceed 3:1;
Total pixel count is at least 655,360 and at most 8,294,400.
Invalid size, quality, output_format, or input media formats return a parameter error.
Status CodeDescription
400Invalid request parameters.
401Missing or invalid API key.
403Insufficient balance or quota, or no permission for the requested model.
404Queried task does not exist.
429Rate limit exceeded.
503Service temporarily unavailable.
500, 502Transient server or upstream error.
Modified at 2026-12-04 07:58:01
Previous
Quickstart & Conventions
Next
Nano Banana Image Generation
Built with