API ReferenceImage APIs

GPT Image 2.5 API

ReachAPI exposes GPT Image 2.5 Flare and Sunburst through both the synchronous OpenAI-compatible Image API and the asynchronous ReachAPI task API. Both products are currently in Internal Preview.

  • Use gpt-image-2.5-flare for fast, high-quality everyday image generation.
  • Use gpt-image-2.5-sunburst when maximum capability and editing precision matter most.

1. Choose an Interface

  • Synchronous generation: POST https://direct.reachapi.ai/v1/images/generations
  • Synchronous editing: POST https://direct.reachapi.ai/v1/images/edits
  • Asynchronous task: POST https://direct.reachapi.ai/v1/images/create
  • Query asynchronous task: GET https://direct.reachapi.ai/v1/tasks/{task_id}

Use the synchronous Image API when the caller can wait for the complete response and wants the native OpenAI request and response shape. Use the asynchronous task API for long-running jobs, URL-based reference images, polling, callbacks, and hosted results in data[].url.

All interfaces use the same model codes and authentication:

Authorization: Bearer YOUR_REACH_API_KEY

2. Synchronous Image API

The synchronous endpoints follow the OpenAI Image API contract. Image generation accepts JSON. Image editing accepts the native multipart form request with one or more image files.

Generate an image

curl -X POST "https://direct.reachapi.ai/v1/images/generations" \
  -H "Authorization: Bearer YOUR_REACH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2.5-flare",
    "prompt": "A precise editorial product photograph of a silver watch on slate, soft studio lighting",
    "size": "1536x1024",
    "quality": "high",
    "background": "auto",
    "moderation": "auto",
    "output_format": "png"
  }'

Edit an image

curl -X POST "https://direct.reachapi.ai/v1/images/edits" \
  -H "Authorization: Bearer YOUR_REACH_API_KEY" \
  -F "model=gpt-image-2.5-sunburst" \
  -F "prompt=Preserve the watch geometry and replace only the background with dark brushed metal" \
  -F "image[]=@/path/to/watch.png" \
  -F "size=1536x1024" \
  -F "quality=xhigh" \
  -F "output_format=png"

Do not set the multipart boundary manually. The client, SDK, or curl -F generates it.

Synchronous contract

  • Use flat OpenAI fields such as model, prompt, size, quality, background, moderation, and output_format; do not wrap them in input.
  • Use POST /v1/images/generations for text-to-image and POST /v1/images/edits for file-based image editing.
  • The synchronous endpoints return the native OpenAI Images response. They do not return a ReachAPI task_id and do not support task polling or callback_url.
  • Follow the OpenAI-compatible endpoint for the complete parameter and response contract, including masks and supported multi-image edits.

3. Asynchronous Task API

The asynchronous endpoint uses a nested { "model": "...", "input": { ... } } request and immediately returns a task ID.

curl -X POST "https://direct.reachapi.ai/v1/images/create" \
  -H "Authorization: Bearer YOUR_REACH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2.5-flare",
    "callback_url": "https://example.com/reachapi/callback",
    "input": {
      "prompt": "A precise editorial product photograph of a silver watch on slate, soft studio lighting",
      "resolution": "2k",
      "aspect_ratio": "3:2",
      "quality": "high",
      "background": "auto",
      "moderation": "auto",
      "output_format": "png"
    }
  }'

Top-level parameters

FieldTypeRequiredDescription
modelstringYesgpt-image-2.5-flare or gpt-image-2.5-sunburst
callback_urlstringNoHTTPS callback for terminal status; maximum length 2048; local and private-network targets are rejected
inputobjectYesImage generation or editing parameters

input parameters

FieldTypeRequiredDescription
promptstringYesPrompt for image generation or editing
image_urlsarray<string>NoUp to 14 server-accessible HTTPS reference images; omit for text-to-image
sizestringNoExact upstream size; takes priority over resolution + aspect_ratio
resolutionstringNo1k, 2k, or 4k; defaults to 1k
aspect_ratiostringNo1:1, 3:2, or 2:3; defaults to 1:1
qualitystringNolow, medium, high, xhigh, max, or auto; defaults to auto
backgroundstringNoauto, opaque, or transparent
moderationstringNoauto or low
output_formatstringNopng, jpeg, or webp

background=transparent cannot be combined with output_format=jpeg.

Standard size mapping

resolution + aspect_ratioOutput size
1k + 1:11024x1024
1k + 3:21536x1024
1k + 2:31024x1536
2k + 1:12048x2048
2k + 3:22048x1152
4k + 3:23840x2160
4k + 2:32160x3840

Use input.size when the desired combination is not in this table.

Asynchronous image editing

Include input.image_urls to edit or transform reference images:

{
  "model": "gpt-image-2.5-sunburst",
  "input": {
    "prompt": "Preserve the watch geometry and replace only the background with dark brushed metal",
    "image_urls": ["https://cdn.example.com/watch.png"],
    "resolution": "2k",
    "aspect_ratio": "3:2",
    "quality": "xhigh",
    "output_format": "png"
  }
}

Task results and callbacks

A successful submission returns a task ID:

{
  "code": 200,
  "msg": "",
  "status": "queued",
  "task_id": "task_xxx",
  "data": []
}

Poll GET /v1/tasks/{task_id} until the status is success or failed. A successful task returns the generated image in data[].url and may also include size and revised_prompt.

When callback_url is supplied, ReachAPI sends the terminal task response to that HTTPS URL. Callback delivery has a 10-second timeout and is retried up to two times after the first attempt.

Asynchronous constraints

  • prompt is required and cannot be blank.
  • image_urls accepts up to 14 HTTPS URLs; base64 image input is not supported.
  • n > 1, masks, output_compression, and user are not exposed by this async endpoint.
  • Without size, resolution + aspect_ratio must match the standard mapping table.

4. Pricing

Both interfaces use the same GPT Image 2.5 Standard token rates. ReachAPI bills only these three metrics:

Usage metricStandard price
Text input$5 / 1M tokens
Image input$8 / 1M tokens
Image output$30 / 1M tokens

Flare and Sunburst use the same token rates. Actual cost per image varies because model choice, quality, dimensions, prompt, and reference images can change token consumption.

5. Availability and References

The two GPT Image 2.5 model codes are Internal Preview products and may not appear in GET /v1/models.

On this page