Generate Images

Creates an image given a prompt. Learn more.

POST
/v1/images/generations/

在给定提示的情况下创建图像。了解更多

AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/v1/images/generations/" \  -H "Content-Type: application/json" \  -d '{    "prompt": "string"  }'
{  "created": 0,  "data": [    {      "b64_json": "string",      "url": "string"    }  ],  "usage": {    "total_tokens": 0,    "input_tokens": 0,    "output_tokens": 0,    "input_tokens_details": {      "text_tokens": 0,      "image_tokens": 0    }  }}