图像生成(Images)
Generate Images
根据文本提示生成图像。
Authorization
bearer AuthorizationBearer <token>
In: header
Header Parameters
X-Request-Timeout?integer
请求超时时间,单位:秒,默认为60秒
Range
1 <= value <= 120Default
60Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
text/event-stream
curl -X POST "https://example.com/v1/images/generations" \ -H "Authorization: Bearer {{YOUR_API_KEY}}" \ -H "X-Request-Timeout: 60" \ -H "Content-Type: application/json" \ -d '{ "model": "Z-Image-Turbo", "prompt": "一只可爱的小猫坐在花园里", "n": 1, "size": "1024x1024" }'{ "created": 1589478378, "data": [ { "b64_json": "iVBORw0KGgoAAAANSUhEUgAA..." } ]}