Skip to main content
POST
GPT-Image-2.5 VIP Image Generation and Editing
The VIP tier creates an image task through POST /v1/images/generations and returns a task ID. After the task finishes, retrieve the image URL through the status endpoint. Like the standard tier, the VIP tier runs as an async task; the differences are the model names, the size format, and the billing model. gpt-image-2.5-vip is the series name used in this document. Always pass the full model name from the table.
The standard tier also runs as an async task, but it is priced by resolution and uses ratio values for size; see the separate GPT-Image-2.5 documentation. The VIP tier uses pixel dimensions and settles by actual token usage.
Note for users in mainland China: Please use https://toapis.cn as the API endpoint (Base URL). Replace https://toapis.com with https://toapis.cn in the examples in this document.
Create an API Key in the ToAPIs console.

Quick Start

Set your API Key as the TOAPIS_API_KEY environment variable, then submit the task:
Example submit response:
Save the returned id, replace TASK_ID below with that value, and query the result:
A task moves through pending, queued, and in_progress, and finally reaches completed or failed. On completed, read the image URL from result.data; on failed, read error. Poll every few seconds. The full set of fields is documented in Image Task Status. A successful submit only means the task was created. Wait until completed before downloading the image, and keep polling the same task ID while you wait. High-quality requests take longer, so keep polling instead of resubmitting.

Generation Request Parameters

string
required
Authenticate with Bearer YOUR_TOAPIS_API_KEY.
string
required
gpt-image-2.5-flare-vip or gpt-image-2.5-sunburst-vip.
string
required
Description of the image. When editing, describe what to keep and what to change.
string
default:"high"
Five levels are supported: low, medium, high, xhigh, and max. The default is high. Use lowercase values.Quality affects the generation result and the actual output tokens. Images with the same quality can still cost different amounts depending on dimensions and content.
string
default:"1024x1024"
Output pixel dimensions in widthxheight format, for example 1024x1024, 1536x1024, 1024x1536, 1280x1024.Custom pixel dimensions allowed by the upstream provider are supported, not only the examples above. The valid size range is enforced by the endpoint validation. VIP examples do not use ratio values such as 1:1, and no separate resolution is required.
string
Optional background setting. Set "transparent" to generate an image with a transparent background. Omit this field for normal image generation.Works with both text-to-image requests and reference image editing.
integer
default:1
Use 1 per request to generate one image.

Transparent Background

Add "background": "transparent" to the generation request to get an image with a transparent background. Omit the field for normal generation.
The task is queried by task ID as usual; read the image URL from result.data.

Reference Image Editing

Editing uses POST /v1/images/edits with a multipart/form-data request. Put the local image in the image file field and pass model, prompt, quality, size, and n alongside it. Editing is also an async task: the submit returns a task ID, and you query the result the same way as generation. The example below uses Sunburst VIP to add a yellow scarf to the baby otter in otter.png:
Let curl set the multipart Content-Type and boundary automatically. Poll the status endpoint with the returned task ID and read the edited image URL from result.data. Flare VIP supports the same editing approach; change the model to gpt-image-2.5-flare-vip. Reference image input incurs image input token costs.

Token Pricing

The prices below are standard prices verified on 2026-09-09. Both VIP models are the same and are billed at 20% off the official token unit prices: All five quality levels share these token unit prices. VIP has no fixed per-image price tied to quality; the task is settled by actual usage after it completes. Submitting a task pre-authorizes an amount, and the final charge is settled from the actual text and image tokens after completion, with any difference refunded or charged. You still need sufficient account balance and API Key quota before calling. Cost formula, in USD:
For example, a low quality 1024x1024 text-to-image request with 27 text input tokens and 196 image output tokens costs:
One measured reference image edit contained 21 text input tokens, 1024 image input tokens, and 196 image output tokens. The formula gives 0.0113416,whichischargedas0.0113416, which is charged as 0.011342 after rounding to the smallest platform quota unit. These are examples for specific requests and do not represent a fixed cost per image at the same quality. Account-specific pricing or discounts may differ; check the model pricing page and your account configuration for the latest prices. You can verify the final charge in the usage logs.

Switching from the Standard Tier

  1. Change the full model name to the matching -vip model name.
  2. Change size from a ratio to pixel dimensions, and omit resolution.
  3. For both text-to-image and reference image editing, poll the result by task ID and read the image URL from result.data.
  4. For reference image editing, switch to /v1/images/edits and upload the image file.
  5. Estimate cost from actual tokens.
For async submission and task polling examples in the standard tier, see the GPT-Image-2.5 documentation.