GPT Image 2 Pro Image-to-Image
/v1/tasks All models are called through the Unified Async API POST /v1/tasks endpoint; only the input fields differ (see input parameters below).
Model summary
| Model name | gpt-image-2-image-to-image-pro |
|---|---|
| Type | Image generation (image-to-image Pro) |
| Endpoint | POST /v1/tasks |
| Pricing | See HiAPI Pricing |
GPT Image 2 Pro Image-to-Image edits, redraws, and upgrades visuals from 1-5 reference images, with up to 2K output.
Production guidance
- For production, pass callback.url at the top level of the request body so HiAPI can notify your service when the task reaches a terminal state.
- GET /v1/tasks/:id is better for local debugging, low-volume jobs, or fallback reconciliation if a callback is missed.
- Use callback.when=final. Both success and fail are terminal states, so your service should deduplicate by taskId.
Best suited for
Use product, portrait, or source images as references for commercial redraws.
input_urlspromptPass up to 5 reference images when subject, style, and scene should come from separate sources.
input_urlsTurn rough source assets into cleaner commerce or brand visuals.
promptresolutionKeep the key subject from the reference while producing a target placement ratio.
aspect_ratioRequest parameters
model string required Fixed value gpt-image-2-image-to-image-pro.
input object required Business parameters for reference image URLs, edit instructions, and output settings.
prompt string required Edit or redraw instruction, up to 20000 characters.
input_urls string[] required Reference image URL array. Minimum 1 image, maximum 5 images.
aspect_ratio enum optional Output image aspect ratio.
resolution enum optional Output resolution tier.
callback object optional Optional callback configuration. In production, pass callback.url so HiAPI can notify your service when the task reaches a terminal state.
url string required HTTPS URL that receives terminal task notifications.
when enum optional Callback trigger timing. Use final for terminal-state notifications.
Example requests
Upgrade a reference into a polished product visual.
{
"model": "gpt-image-2-image-to-image-pro",
"input": {
"prompt": "Restyle the reference into a premium product campaign image with clean typography, soft studio lighting",
"input_urls": [
"https://example.com/reference.png"
],
"aspect_ratio": "4:5",
"resolution": "2K"
}
}Pass up to 5 reference images and explain how each should be used.
{
"model": "gpt-image-2-image-to-image-pro",
"input": {
"prompt": "Use the first image as the product, the second image as the lighting reference, create a clean catalog hero image",
"input_urls": [
"https://example.com/product.png",
"https://example.com/style.png"
],
"aspect_ratio": "16:9",
"resolution": "2K"
},
"callback": {
"url": "https://your-domain.com/hiapi/callback",
"when": "final"
}
}Getting the result
- The response returns a taskId immediately without waiting for generation to finish.
- In production, prefer waiting for callback.url to receive the terminal notification. For local debugging, poll GET /v1/tasks/:id.
- When status=success, download the generated image from output[].url.
- When status=fail, fix the request based on the returned error instead of retrying the same invalid payload.