Create an image
Generate an image from a text prompt with the OpenAI-compatible API.
Depending on the model, you can control the number of images, size, quality, style, and response format.
/v1/images/generationsGenerate one or more images from a text prompt. Describe the subject, scene, composition, viewpoint, visual style, and overall mood, then use the size, quality, and response-format options supported by the model.
Model availability and constraints for fields such as n, quality, size, and style depend on the selected model. Use an image-generation model visible to the current API key.
Authorization
bearerAuth Use Bearer your-api-key in the Authorization Header.
In: header
Request Body
application/json
Image generation request parameters.
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json