Skip to content
English

GPT Image 2.5 Flare Text to Image API

POST Base URL: 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 Text to image mode.

Request parameters

model string required

Use exactly gpt-image-2.5-flare/text-to-image.

example gpt-image-2.5-flare/text-to-image
input object required

Mode parameters.

prompt string required

Prompt length: 1–20,000 characters.

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.

default 1K enum: 1K2K4K
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, describe an isolated subject with no backdrop, scenery, or shadow.

enum: transparentopaqueauto
callback object optional

Optional terminal-state callback.

url string required

HTTPS 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

Request example

Text to image example

Replace the prompt with your description; no reference image is needed for this mode.

Request body
{
  "model": "gpt-image-2.5-flare/text-to-image",
  "input": {
    "prompt": "A red apple isolated on a transparent background.",
    "aspect_ratio": "auto",
    "background": "transparent",
    "resolution": "1K"
  }
}
Success response

Response body
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "tk-hiapi-..."
  }
}

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.