ImageResponse

@Serializable
data class ImageResponse(val created: Long, val data: List<ImageJSON> = emptyList(), val background: ImageBackground? = null, val outputFormat: ImageOutputFormat? = null, val quality: Quality? = null, val size: ImageSize? = null, val safetyIdentifier: String? = null, val usage: ImageUsage? = null)

Images and metadata returned by generation or editing.

Constructors

Link copied to clipboard
constructor(created: Long, data: List<ImageJSON> = emptyList(), background: ImageBackground? = null, outputFormat: ImageOutputFormat? = null, quality: Quality? = null, size: ImageSize? = null, safetyIdentifier: String? = null, usage: ImageUsage? = null)

Properties

Link copied to clipboard
@SerialName(value = "background")
val background: ImageBackground? = null

Effective background.

Link copied to clipboard
@SerialName(value = "created")
val created: Long

Creation time in Unix seconds.

Link copied to clipboard
@SerialName(value = "data")
val data: List<ImageJSON>

Base64-encoded output images.

Link copied to clipboard
@SerialName(value = "output_format")
val outputFormat: ImageOutputFormat? = null

Effective encoding.

Link copied to clipboard
@SerialName(value = "quality")
val quality: Quality? = null

Effective quality.

Link copied to clipboard
@SerialName(value = "safety_identifier")
val safetyIdentifier: String? = null

Effective end-user safety identifier.

Link copied to clipboard
@SerialName(value = "size")
val size: ImageSize? = null

Effective dimensions.

Link copied to clipboard
@SerialName(value = "usage")
val usage: ImageUsage? = null

Token accounting, when returned by the model.