Skip to main content
POST
GPT-Image-2.5 Official Image Generation
Access both GPT-Image-2.5 models through the official Azure channel. Submission returns an asynchronous task ID immediately. Images are generated in the background and stored in R2 before delivery. Use the full model name from this table. gpt-image-2.5-official is a series label, not a valid request model. For mainland China, replace https://api.toapis.com with https://api.toapis.cn. Create an API Key in the console and set the TOAPIS_API_KEY environment variable.

Submit and Query

Submit one Flare image. Change model to call Sunburst:
Save the id from the submission response and replace TASK_ID below:
Submission returns pending. Polling may return queued or in_progress, followed by completed or failed. On completed, read the R2 image URLs from result.data[].url. On failed, read error. Poll the same task ID every few seconds. High-quality generation can take several minutes; keep polling instead of submitting duplicate requests. See the image task status API for the complete response fields.

Request Parameters

string
required
Use a ToAPIs API Key as Bearer YOUR_API_KEY. Azure credentials are not required.
string
required
gpt-image-2.5-sunburst-official / gpt-image-2.5-flare-official.
string
required
Describe the image. For reference-image requests, describe what to preserve and change.
string
default:"high"
Supports low, medium, high, xhigh, and max. Quality and dimensions affect actual token usage and processing time.
string
default:"1024x1024"
Use pixel dimensions such as 1024x1024, 1536x1024, or 1024x1536. Custom dimensions must pass upstream validation. These examples do not require an additional resolution field.
string
Optional. Set transparent to request a transparent background. Omit it to use the upstream default. The default PNG output preserves transparency.
integer
default:1
The official channel currently generates one image per request. Use 1.

Reference Image URLs

For image-to-image requests, add image_urls to the same JSON generation request. URLs must be accessible to the server. You can obtain URLs through the image upload API. Reference images incur image input token charges. Submission and polling use the same asynchronous flow.

Token Pricing

Standard prices verified on 2026-09-11. Both official models are billed at 80% of official token rates, a 20% discount: Quota is reserved at submission and reconciled against actual upstream text and image token usage on success. All five quality levels use these unit prices; there is no fixed per-image price for each quality. Sufficient account balance and API Key quota are required before submission. Cost formula, in USD:
For example, 17 uncached text input tokens and 196 image output tokens cost (17 * 4 + 196 * 24) / 1,000,000 = $0.004772. This is not a fixed price per image. Account-specific pricing or discounts still apply. Verify the final charge in usage logs. Current prices follow the pricing page and your account configuration. The standard tier and VIP tier have their own full model names. Use the -official suffix for the channel documented here.