X-AIO_FrameX-AIO
图像生成(Images)

Generate Images

POST
/v1/images/generations

根据文本提示生成图像。

AuthorizationBearer <token>

In: header

Header Parameters

Authorization?string
X-Request-Timeout?integer

请求超时时间,单位:秒,默认为60秒

Range1 <= value <= 120
Default60

Request 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..."    }  ]}