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.

POST/v1/images/generations

Returns JSON by default, with images in data[].b64_json; set stream: true to receive SSE image events.

Authorization

bearerAuth
AuthorizationBearer <token>

Use a platform API key in the format Authorization: Bearer your-api-key.

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

Streaming response events

These fields describe the JSON in one data: event, not the complete SSE text stream.

OpenAI Images Generations official documentationSee API fields and streaming event definitions.