Node.js
Images
Generate an image
Generate an image and return the completed result.
POST
Node.js
Authorizations
Send your API key as a bearer token:
Authorization: Bearer sk_<secret>.
Body
application/json
AI model ID. See supported models.
Description of the image to generate or an editing instruction.
Required string length:
1 - 4096Maximum array length:
8Optional output aspect ratio. See supported values by model.
Optional output resolution. See supported values by model.
Output image format.
Available options:
png, jpeg, webp