X-AIO_FrameX-AIO
Image Generation

Generate Images

POST
/v1/images/generations

Generates images from a text prompt.

AuthorizationBearer <token>

In: header

Header Parameters

Authorization?string
X-Request-Timeout?integer

Request timeout in seconds. Defaults to 60 seconds.

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": "A cute kitten sitting in a garden.",    "n": 1,    "size": "1024x1024"  }'
{  "created": 1589478378,  "data": [    {      "b64_json": "iVBORw0KGgoAAAANSUhEUgAA..."    }  ]}