Skip to main content
POST
Use this JSON operation when the caller can keep one connection open until the image is complete. Set model to gpt-image-2-web or gpt-image-2-vip; consult the selected model’s Parameters page before adding quality.
Try it sends a real billable request. Confirm model, size, and quality, use a development key, and do not share generated cURL that contains the key.
Task workers that need an early task ID should use the unified image-task endpoint with action=generate.

Authorizations

Authorization
string
header
required

YingTu API key.

Body

application/json
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:

"A blue ceramic teapot on a pale table, no text"

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

The documented subset returns one image.

Available options:
1

Response

Complete GPT 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