Skip to content
English

gpt-image-2.5-sunburst/image-to-image

POST Base URL: https://api.hiapi.ai /v1/tasks

Image, video, and audio models are called through theUnified Async API POST /v1/tasks endpoint; only the input fields differ (see input parameters below).

Model summary

Model ID gpt-image-2.5-sunburst/image-to-image
Mode Image to image
Pricing View live pricing

gpt-image-2.5-sunburst Image to image mode.

Production guidance

Calling notes
  • Put model at the top level and parameters inside input.
  • callback.url must be an http(s) terminal notification URL; when=final notifies on both success and failure.

Best suited for

Image to image

Call Image to image with gpt-image-2.5-sunburst/image-to-image.

image_urlspromptaspect_ratioresolutionbackgroundoutput_format

Request parameters

model string required

Use exactly gpt-image-2.5-sunburst/image-to-image.

example gpt-image-2.5-sunburst/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; exceeding the character limit returns INVALID_REQUEST. Image-to-image is not subject to the text-to-image token guard.

aspect_ratio enum optional

Output aspect ratio.

default auto enum: auto1:13:22:34:33:416:99:1621:927:1616:279:88:9
resolution enum optional

Output resolution. Price per output image: 1K $0.025, 2K $0.04, 4K $0.06 (default 1K).

default 1K enum: 1K2K4K
background enum optional

Optional background treatment: transparent, opaque, or auto; no default. transparent returns an image with an alpha channel at 1K, 2K, and 4K, and only supports png or webp; combining transparent with jpeg returns a 400. 1K transparent output may have slightly different dimensions from opaque output. For transparent output, explicitly ask to extract the subject and keep the background transparent.

enum: transparentopaqueauto
output_format enum optional

Output image format: png, jpeg, or webp; defaults to PNG. Transparent backgrounds only support png or webp, and combining transparent with jpeg returns a 400. The fallback channel may return PNG.

default png enum: pngjpegwebp
callback object optional

Optional terminal-state callback.

url string required

http(s) URL that receives success or failure terminal notifications.

example https://your-domain.com/hiapi/callback
when enum optional

Notify when the task succeeds or fails.

default final enum: final

Example requests

Image to image example

Replace the prompt with your description and replace the reference image URL.

Request body
{
  "model": "gpt-image-2.5-sunburst/image-to-image",
  "input": {
    "prompt": "Create a museum-grade square still-life photograph of a lacquer conservation studio and lunar cabinet.",
    "image_urls": [
      "https://example.com/reference.webp"
    ],
    "aspect_ratio": "auto",
    "background": "opaque",
    "resolution": "1K"
  }
}

Getting the result

  1. Receive a taskId after submission.
  2. Poll GET /v1/tasks/:id or wait for the terminal callback.
  3. When status=success, download the image from data.output[].url before expireAt.
  4. When status=fail, inspect data.error, correct the request, and resubmit.

FAQ

Next steps