AGTCloud API Docs
GuidesAPI ReferenceIntegrations and resourcesUpdate and help
Image generationGrok Image

Create an image

Create a Grok image from a text prompt.

This API reuses the OpenAI Images Generations path and supports Grok-specific parameters such as aspect_ratio and resolution.

POST/v1/images/generations

Create one or more images from a text prompt. This API reuses the OpenAI-style POST /v1/images/generations endpoint and adds aspect-ratio and resolution parameters for Grok image models.

Example model IDs include grok-imagine-image-pro and grok-imagine-image. Before calling the API, use the model list for the current API key to confirm which model IDs are available.

A single request can create up to 10 images. URL results are temporary and should be downloaded or processed promptly. Generated content may be filtered by content policies, and output images are typically in JPG format.

Authorization

bearerAuth
AuthorizationBearer <token>

Use Bearer your-api-key in the Authorization header.

In: header

Request Body

application/json

Grok image-generation request parameters.

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json