curl --request POST \
--url https://api.yingtu.ai/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gpt-image-2-web",
"prompt": "A blue ceramic teapot on a pale table, no text"
}
'{
"created": 1788307200,
"data": [
{
"b64_json": "iVBORw0KGgo="
}
],
"usage": {
"input_tokens": 24,
"output_tokens": 1756,
"total_tokens": 1780,
"input_tokens_details": {
"text_tokens": 24,
"image_tokens": 0
},
"output_tokens_details": {
"text_tokens": 0,
"image_tokens": 1756
}
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "insufficient_user_quota"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "insufficient_user_quota"
}
}{
"error": {
"message": "Insufficient balance for this request",
"type": "new_api_error",
"param": "",
"code": "insufficient_user_quota"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "insufficient_user_quota"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "insufficient_user_quota"
}
}GPT Image API
Generate a GPT Image image
Inspect and test the YingTu OpenAI Images Generate operation for Web or VIP, including prompt, size, model-specific quality, Base64 PNG output, and errors.
POST
/
v1
/
images
/
generations
curl --request POST \
--url https://api.yingtu.ai/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gpt-image-2-web",
"prompt": "A blue ceramic teapot on a pale table, no text"
}
'{
"created": 1788307200,
"data": [
{
"b64_json": "iVBORw0KGgo="
}
],
"usage": {
"input_tokens": 24,
"output_tokens": 1756,
"total_tokens": 1780,
"input_tokens_details": {
"text_tokens": 24,
"image_tokens": 0
},
"output_tokens_details": {
"text_tokens": 0,
"image_tokens": 1756
}
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "insufficient_user_quota"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "insufficient_user_quota"
}
}{
"error": {
"message": "Insufficient balance for this request",
"type": "new_api_error",
"param": "",
"code": "insufficient_user_quota"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "insufficient_user_quota"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "insufficient_user_quota"
}
}Use this JSON operation when the caller can keep one connection open until the image is complete. Set
Task workers that need an early task ID should use the unified image-task endpoint with
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.
action=generate.Authorizations
YingTu API key.
Body
application/json
Available options:
gpt-image-2-web, gpt-image-2-vip Example:
"gpt-image-2-web"
Minimum string length:
1Example:
"A blue ceramic teapot on a pale table, no text"
Current public presets. Set size explicitly for predictable dimensions; the 4K landscape value is 3840x2160.
Available options:
1024x1024, 2048x2048, 3840x2160 Example:
"1024x1024"
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"
The documented subset returns one image.
Available options:
1 Response
Complete GPT Image response
Unix timestamp in seconds.
Required array length:
1 elementShow child attributes
Show child attributes
Output size when returned by the selected GPT Image route.
Quality value reported by the selected GPT Image route.
Show child attributes
Show child attributes
Last modified on September 3, 2026