Access GPT-Image-2.5 API for Just $0.005 per Image (Full Guide)
GPT-Image-2.5 Update: Simply Put — Faster, Sharper, and Precise Local Edits
Flare = Fast, high-quality, ideal for high-volume image generation
Sunburst = Stronger fine-grained generation/editing, ideal for final deliverables
Is it really that powerful? Of course it’s not just talk. This article will give a detailed introduction to the highlights of the GPT-Image-2.5 update and how to call the gpt-image-2.5-Sunburst and gpt-image-2.5-Flare models from within China.
To be honest, my biggest impression when using 2.0 wasn’t that it couldn’t draw well, but that it couldn’t write Chinese properly. Large characters were okay, but small text was a mess. Text usually had to be added later manually, which was very troublesome.
For cover main titles with relatively large Chinese characters, 2.0 could basically write them correctly and the glyphs were fairly upright. But as soon as you asked it to write small text — such as subtitles, bottom descriptions, or annotations in infographics — problems started: complex strokes easily became blurry, more characters led to missing strokes, and Chinese-English mixed layouts each went their own way. It looked okay at a glance, but zooming in revealed complete gibberish. Moreover, running the same prompt twice produced different small-text results every time, so you simply couldn’t treat it as a “deliverable” product.
When 2.5 came out, what I was most curious about was whether Chinese small text had finally been fixed. After testing, my feeling is that it’s much more stable than 2.0. Large characters are still fine. Small text occasionally still has slight deformation, but at least whole paragraphs no longer turn into gibberish, and Chinese-English mixed layouts are much sharper. Combined with transparent background output, the generated text-containing assets can be directly overlaid onto PPT, web pages, or poster templates without having to re-typeset the text every time.
This update also solved and optimized the three most painful core issues of the previous GPT Images 2 version: slowness, blurriness, and the problem that changing one part caused the entire image to collapse.
This article follows the usual way I share APIs and model tuning: first talk about what exactly was updated in 2.5 and how to choose between Flare and Sunburst, then provide the complete process, code, and common problems I encountered when directly calling it via the GRSAI API from within China. If you’re looking for where to access the gpt-image-2.5 API, I hope this article can help you.
1. New Flare and Sunburst Models
Ordinary users can experience them directly in ChatGPT, Codex, and image.grsai.ai. This update introduced two API models:
- GPT-Image-2.5 Flare: The daily default first choice. Image quality higher than 2.0, latency reduced by up to about 50%.
- GPT-Image-2.5 Sunburst: Flagship-level image quality and editing precision. Longer generation time, designed specifically for scenes that pursue refinement.
2. Major Leap in Editing Capability: The Core Upgrade of Version 2.5
This time OpenAI’s upgrade to the official drawing functions and capabilities really hit the sweet spot for many designers, moving both those who can draw and those who can’t to tears of emotion. Previous image generation models had poor consistency — if you only wanted to change one detail, it would redraw the entire image, resulting in low consistency. The 2.5 version not only fixed this long-standing problem but also added a batch of practical tools that let creators “start working immediately”:
Four Core Editing Capability Upgrades
1.Local editing with more accurate modifications
Directly select an area on the image for precise modification. Only the place you want to change is modified. No need to describe the original content — just input what it should be changed into.
Example: You generated a coffee product image and found the copy on the cup needed changing. In the past you had to describe where to modify and what to change it to; now you only need to circle the position that needs modification and input “change the copy to ‘Grsai coffee’”. The composition and background of the image are completely preserved and only generated according to your requirements.
2.Improved multi-round editing consistency
In continuous modifications with 2.5, content already changed earlier is firmly retained. Subjects in reference images are less likely to deform. When changing backgrounds or styles, the subject’s appearance can still be preserved, and it won’t become increasingly blurry or unrelated the more you edit.
Example: You generated a character poster for a brand. In the first round you changed the background from indoor to seaside; in the second round you changed the character’s clothing from a suit to a swimsuit and adjusted the pose. After the third, fourth, fifth, and sixth rounds, the character’s face might have become less and less like the original. In version 2.5, the character’s facial features, hairstyle, and body type remain consistent even after more than ten rounds of editing, like the same person photographed in different scenes.
3.Fewer garbled text
Text errors in infographics and posters are significantly reduced. The transparent background function allows brand assets and game assets to be directly cut out for use.
Previously in versions 1.5 and 2.0, generated text often had missing strokes or merged together. Version 2.5 renders multi-language text more stably, and Chinese-English mixed layouts also remain sharp without deformation. Combined with transparent background output, generated infographics can be directly overlaid onto your PPT, web pages, or poster templates. It can also generate some quiz questions for children to practice. Text information output on poster product images is more stable and less prone to garbled characters.
4.Sketch tool turns sketches into masterpieces
Sketch canvas function: This is the most exciting new feature of this update. You only need to type @Sketch in the ChatGPT dialogue box to open a canvas and casually draw a draft as a composition reference. Completely no drawing foundation is required — the more “soulful” the drawing, the better the contrast effect. The model will transform your sketch into a complete finished image, and you can also attach text descriptions to specify style and details.
3. How to Choose Between Flare and Sunburst
The two models have the same Token unit price in the official OpenAI API (image input $8/M token, $30/M Token). Although the price is the same as the previous generation, the cost per image for Sunburst is often higher — not because it has a markup, but because it thinks longer and generates more Tokens.
Flare: Positioned as “fast and good enough,” the default first choice for most scenarios. Its speed is about 50% lower latency than 2.0, very suitable for social media images, batch generation, prototype iteration, product page images, and similar scenarios. Its editing capability is already significantly stronger than 2.0.
Sunburst: Positioned as “more accurate and finer.” Willing to wait longer for delivery-level precision. It is clearly slower, but in exchange you get higher control. It is the ideal choice for brand posters, refined product images, multi-round brand consistency editing, and similar scenarios. Cross-round editing control is tighter, suitable for fine work that needs to be “edited until the client nods.”
Selection strategy recommendations:
- Text-to-image, need volume, need speed, need iteration → Just use gpt-image-2.5-flare without thinking
- Image editing, multi-image fusion, final deliverable → Firmly choose gpt-image-2.5-sunburst
- Projects already running gpt-image-2: Just change the model field in the code to the 2.5 ID for seamless upgrade
- Additionally note that the quality levels of 2.5 have been refined to: low / medium / high / xhigh / max / auto.
4. Practical Tutorial for Direct Connection from China: Calling GPT-Image-2.5 with GRSAI API
Get GrsAi API’s stories in your inbox
Join Medium for free to get updates from this writer.
For domestic developers and enterprise users, directly connecting to the GPT-Image-2.5 series models via GRSAI API (grsai.com) supports high concurrency, does not deduct credits for failed or violated requests, unifies billing for all resolutions and qualities, and is also compatible with the official OpenAI format for calls.
- gpt-image-2.5 (basic version): 0.005 per image, only supports 1K resolution. This is a very economical entry-level option, suitable for large-scale testing.
- gpt-image-2.5-flare (fast version): 0.018per image, supports 1K/2K/4K and all quality parameters, transparent background and masks, fast speed, suitable for daily production.
- gpt-image-2.5-sunburst (flagship version): 0.015 per image, supports 1K/2K/4K and all quality parameters, transparent background and masks, high precision, suitable for delivery-level final images.
4.1 Preparations
Before starting the call, please ensure the following two steps are completed:
- Obtain an API Key: Create an API Key on the Apikey page in the GrsaiAPI (https://grsai.com/) console (format is sk-…).
- View the docking documentation provided by Grsai: https://qmy27nhsd9.apifox.cn/452392911e0
4.2 Determine the Interface Endpoint and Model
Base URL (base request address)
- Full generation endpoint: POST https://grsai.dakka.com.cn/v1/api/generate
- Available model names:
gpt-image-2.5 (basic version, only supports 1K resolution, high cost-performance)
gpt-image-2.5-flare (fast version, supports 1K/2K/4K, fast speed)
gpt-image-2.5-sunburst (flagship version, supports 1K/2K/4K, high precision)
4.3 Practical Code: Generate the First Image
The following Python script demonstrates how to call the Flare model to generate a 1K image and save it locally.
Python
from openai
import OpenAI
import base64
import requests
# ================= Configuration area (please make sure to replace) =================
YOUR_API_KEY = "sk-your-GRSAI-API-Key" # Grsai.com API Key
BASE_URL = "https://grsai.dakka.com.cn/v1" # Fixed endpoint
# ========================================================
# Initialize client (compatible with OpenAI SDK)
client = OpenAI(
api_key=YOUR_API_KEY,
base_url=BASE_URL, # The SDK will automatically append /images/generations
)
def generate_and_save(prompt, model="gpt-image-2.5-flare", size="1024x1024", quality="medium", save_path="output.png"):
"""
Call GRSAI API to generate an image and save it
Args:
prompt (str): Image description
model (str): Model name, e.g. 'gpt-image-2.5-flare'
size (str): Size, e.g. "1024x1024" (1K), "2048x1152" (2K), "3840x2160" (4K)
quality (str): Quality level, optional "low","medium","high","xhigh","max"
save_path (str): Save path
"""
print(f"⏳ Requesting generation: {prompt[:30]}...")
try:
# Call API
response = client.images.generate(
model=model,
prompt=prompt,
size=size,
quality=quality,
# Optional parameter: background="transparent" can generate transparent background
)
# Parse and save image
if response.data and len(response.data) > 0:
image_data = response.data[0]
# Handle Base64 encoded return (most common)
if hasattr(image_data, 'b64_json') and image_data.b64_json:
image_bytes = base64.b64decode(image_data.b64_json)
with open(save_path, "wb") as f:
f.write(image_bytes)
print(f"✅ Image saved to: {save_path}")
# Handle URL return (backup)
elif hasattr(image_data, 'url') and image_data.url:
img_response = requests.get(image_data.url)
with open(save_path, "wb") as f:
f.write(img_response.content)
print(f"✅ Image saved to: {save_path}")
else:
print("⚠️ Unrecognized image data format:", image_data)
else:
print("❌ API returned empty data")
except Exception as e:
print(f"❌ Generation failed: {e}")
# Print detailed server error (if any)
if hasattr(e, 'response'):
print("Server error details:", e.response.text)
# ================= Test run =================
if __name__ == "__main__":
# Test case 1: Quick generation (Flare + 1K)
generate_and_save(
prompt="A Shiba Inu wearing sunglasses sitting on a surfboard, sunny beach, realistic photography style",
model="gpt-image-2.5-flare",
size="1024x1024",
quality="medium",
save_path="test_dog_1k.png"
)
# Test case 2: High-quality generation (Sunburst + 2K) - uncomment to test
# generate_and_save(
# prompt="The same scene, but changed to cinematic lighting, with sparkling details on the sea surface",
# model="gpt-image-2.5-sunburst",
# size="2048x1152", # 2K
# quality="high",
# save_path="test_dog_2k.png"
# )4.4 Quick Test with cURL Command (No Programming Required)
If you don’t want to write code, you can directly test interface connectivity in the terminal (command line) with a cURL command:
curl -X POST "https://grsai.dakka.com.cn/v1/api/generate" -H "Authorization: Bearer sk-copy-API-Key-from-console" -H "Content-Type: application/json" -d '{"model": "gpt-image-2.5-flare", "prompt": "A steaming hot latte coffee", "size": "1024x1024", "quality": "medium"}'Success return example: You will receive a JSON response containing a url image link field. Open the URL directly to save the image.
Failure troubleshooting:
- 400: Check whether parameters (such as size, quality) are within the range supported by the model.
5. Common Questions When Calling the API
Q1: Where to obtain the API Key? What is the format?
Create an API Key on the Apikey page in the GRSAI console (https://grsai.com/). The format is sk-…. After creation, please keep it safe and do not leak it into public repositories or front-end code.
Q2: How to troubleshoot when a generation task returns a 400 error?
Troubleshoot in the following order:
- Check whether parameters and the interface are correct: Check whether model, size, quality, background and other parameters are within the range supported by the model, whether the Base URL and endpoint path are written correctly, and whether the JSON format is valid.
- Whether the image link can be opened in the browser: If an image URL is returned, first copy it to the browser to open and confirm whether the link itself is valid and whether it is blocked.
- Test whether the model can be used normally in image.grsai.ai: If it also cannot be used in the official image generation tool, wait patiently for the model to be fixed, or contact online customer service for consultation.
Q3: How to choose 1K / 2K / 4K?
Unlike some other models, GPT does not control resolution through a simple resolution parameter but through aspect ratio pixel values. Different interfaces have different resolution parameters; you need to look at the corresponding parameter content in the documentation. For the “v1/api/generate” interface, the pixel value uses the “aspectRatio” parameter and needs to be filled with specific pixel values, for example:
- Square 1K: 1024x1024
- Landscape 2K: 2048x1152
- Portrait 2K: 1152x2048
- Landscape 4K: 3840x2160
- Portrait 4K: 2160x3840
It is recommended to prioritize using the sizes clearly listed in the documentation and not to arbitrarily pass any width and height, otherwise it is easy to trigger errors.
Q4: How long is the returned image link valid?
Both images and videos are valid for two hours. Please download or transfer them in time within the link validity period; the link will become invalid after expiration.
Q5: How to generate a transparent background?
Add background=”transparent” in the request (requires model support). Flare / Sunburst support transparent background and masks. Specific field names and values shall be subject to the Grsai docking documentation.
Q6: How to pass parameters for image editing / local editing?
2.5 supports local editing and masks. Taking the “v1/api/generate” interface as an example, the following parameters usually need to be passed:
- images: Reference image (as input)
- mask: Mask (marks the area to be modified)
- prompt: Text description (what to change it to)
Python
import http.client
import json
conn = http.client.HTTPSConnection("v1")
payload = json.dumps({
"model": "gpt-image-2",
"prompt": "Generate a screenshot of a Border Collie and an Old English Sheepdog live streaming on Douyin",
"images": ["https://xxxx.png"],
"background":"transparent",
"mask":"https://xxxx.png"
})
headers = {
'Authorization': 'Bearer sk-xxxxxxxxxxx',
'Content-Type': 'application/json'
}
conn.request("POST", "/api/generate", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))6. Summary: How to Choose in One Sentence
The GPT-Image-2.5 update this time is simply: faster, clearer, and better results. For domestic developers and enterprise users, directly connecting to the GPT-Image-2.5 series models via GRSAI API (grsai.com) supports high concurrency, does not deduct credits for failed or violated requests, unifies billing for all resolutions and qualities, and is also compatible with official OpenAI format calls.







