ImageEditRequest

@Serializable
data class ImageEditRequest(val images: List<ImageReference>, val prompt: String, val model: ModelId? = null, val n: Int? = null, val size: ImageSize? = null, val quality: Quality? = null, val inputFidelity: ImageInputFidelity? = null, val mask: ImageReference? = null, val markup: ImageReference? = null, val background: ImageBackground? = null, val moderation: ImageModeration? = null, val outputCompression: Int? = null, val outputFormat: ImageOutputFormat? = null, val partialImages: Int? = null, val safetyIdentifier: String? = null, val user: String? = null)

Edits one to sixteen referenced images using the current JSON image API.

Constructors

Link copied to clipboard
constructor(images: List<ImageReference>, prompt: String, model: ModelId? = null, n: Int? = null, size: ImageSize? = null, quality: Quality? = null, inputFidelity: ImageInputFidelity? = null, mask: ImageReference? = null, markup: ImageReference? = null, background: ImageBackground? = null, moderation: ImageModeration? = null, outputCompression: Int? = null, outputFormat: ImageOutputFormat? = null, partialImages: Int? = null, safetyIdentifier: String? = null, user: String? = null)

Properties

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

Background transparency.

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

Source images, in reference order.

Link copied to clipboard
@SerialName(value = "input_fidelity")
val inputFidelity: ImageInputFidelity? = null

Fidelity control for supporting models.

Link copied to clipboard
@SerialName(value = "markup")
val markup: ImageReference? = null

Optional markup overlay; cannot be combined with mask.

Link copied to clipboard
@SerialName(value = "mask")
val mask: ImageReference? = null

Optional edit mask; cannot be combined with markup.

Link copied to clipboard
@SerialName(value = "model")
val model: ModelId? = null

Image model; omitted to use the service default.

Link copied to clipboard
@SerialName(value = "moderation")
val moderation: ImageModeration? = null

Image moderation level.

Link copied to clipboard
@SerialName(value = "n")
val n: Int? = null

Number of output images.

Link copied to clipboard
@SerialName(value = "output_compression")
val outputCompression: Int? = null

JPEG or WebP compression from 0 to 100.

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

Encoded image format.

Link copied to clipboard
@SerialName(value = "partial_images")
val partialImages: Int? = null

Number of partial images requested during streaming, from 0 to 3.

Link copied to clipboard
@SerialName(value = "prompt")
val prompt: String

Description of the desired edit.

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

Output quality.

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

Stable, non-identifying end-user identifier.

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

Output dimensions.

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

Deprecated end-user identifier; prefer safetyIdentifier.