AGTCloud API Docs
GuidesAPI ReferenceIntegrations and resourcesUpdate and help
Image generationOpenAI Images

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.

POST/v1/images/generations

Generate 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
AuthorizationBearer <token>

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