Deserialised response from OpenAI's Image Generation endpoint (POST /v1/images/generations), returned by OpenAiClient.getImageGeneration. Wraps the generated images and the request settings that produced them, and is used by OpenAiImageProvider to build images on behalf of the platform's AI features.


Properties

PropertyReturnsDescription
backgroundStringBackground setting used to generate the images, such as transparent or opaque.
createdlongUnix timestamp, in seconds, of when OpenAI created the images.
dataList<ImageLocation>Generated images, each returned as either a URL or inline base64 data.
outputFormatStringFile format of the generated images, such as png or jpeg.
qualityStringQuality level used to generate the images, such as standard or hd.
sizeStringPixel dimensions of the generated images, such as 1024x1024.
usageMap<String,Object>Raw token usage details OpenAI returned for the image generation request, as an untyped map of the JSON OpenAI sent back.

Methods

getCreated()

Returns: long

Unix timestamp, in seconds, of when OpenAI created the images.

getOutputFormat()

Returns: String

File format of the generated images, such as png or jpeg.

getBackground()

Returns: String

Background setting used to generate the images, such as transparent or opaque.

getQuality()

Returns: String

Quality level used to generate the images, such as standard or hd.

getSize()

Returns: String

Pixel dimensions of the generated images, such as 1024x1024.

getData()

Returns: List<ImageLocation>

Generated images, each returned as either a URL or inline base64 data.

getUsage()

Returns: Map<String,Object>

Raw token usage details OpenAI returned for the image generation request, as an untyped map of the JSON OpenAI sent back.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.