GPT Image 2.5 Flare Image to Image API
https://api.hiapi.ai /v1/tasks Submit a text-to-image or image-to-image task, then query it with GET /v1/tasks/:id.
gpt-image-2.5-flare Image to image mode.
Request parameters
model string required Use exactly gpt-image-2.5-flare/image-to-image.
input object required Mode parameters.
image_urls string[] required Image URLs for editing or reference; required, with 1–16 JPEG, PNG, or WebP images. SVG, GIF, and other formats are unsupported. Each image must be at most 20 megapixels and 30 MB, served from a publicly reachable, directly downloadable http(s) URL; data URIs are also accepted.
prompt string required Prompt length: 1–20,000 characters.
aspect_ratio enum optional Output aspect ratio.
resolution enum optional Output resolution.
background enum optional Optional background treatment: transparent, opaque, or auto; no default. transparent only takes effect at resolution=1K and returns a PNG with alpha; at 2K/4K the output is opaque, so do not rely on it. For transparent output, explicitly ask to extract the subject and keep the background transparent.
callback object optional Optional terminal-state callback.
url string required HTTPS URL that receives success or failure terminal notifications.
when enum optional Notify when the task succeeds or fails.
Request example
Replace the prompt with your description and replace the reference image URL.
{
"model": "gpt-image-2.5-flare/image-to-image",
"input": {
"prompt": "Keep the main subject and remove the background.",
"image_urls": [
"https://example.com/reference.webp"
],
"aspect_ratio": "auto",
"background": "transparent",
"resolution": "1K"
}
}{
"code": 200,
"message": "success",
"data": {
"taskId": "tk-hiapi-..."
}
}Getting the result
- Receive a taskId after submission.
- Poll GET /v1/tasks/:id or wait for the terminal callback.
- When status=success, download the image from data.output[].url before expireAt.
- When status=fail, inspect data.error, correct the request, and resubmit.