Skip to main content
POST
Edit one source image with GPT Image (billable)
Upload one PNG, JPEG, or WebP source image with a prompt. Both reverse-image routes forward low, medium, high, or auto; the selected upstream determines the effect. This Images-shaped operation is synchronous. For asynchronous work with 1–16 reference images, submit JSON to /v1/images/tasks with action=edit.
Try it can create a real billable edit. Use a development image and key, and do not share authenticated generated cURL.

Authorizations

Authorization
string
header
required

YingTu API key.

Body

multipart/form-data
model
enum<string>
required
Available options:
gpt-image-2-web,
gpt-image-2-vip
Example:

"gpt-image-2-web"

prompt
string
required
Minimum string length: 1
Example:

"Keep the product and replace the background with pale blue"

image
file
required

One PNG, JPEG, or WebP source image.

size
enum<string>

Current public presets. Set size explicitly for predictable dimensions; the 4K landscape value is 3840x2160.

Available options:
1024x1024,
2048x2048,
3840x2160
Example:

"1024x1024"

quality
enum<string>

Forwarded for both GPT Image routes. The selected upstream determines how the requested value affects the result.

Available options:
low,
medium,
high,
auto
Example:

"low"

n
enum<integer>
default:1
Available options:
1

Response

Complete edited image response

created
integer<int64>
required

Unix timestamp in seconds.

data
object[]
required
Required array length: 1 element
size
string

Output size when returned by the selected GPT Image route.

quality
string

Quality value reported by the selected GPT Image route.

usage
object
Last modified on September 3, 2026