Images

interface Images

Given a prompt and/or an input image, the model will generate a new image.

Inheritors

Functions

Link copied to clipboard
open suspend fun image(edit: ImageEditRequest, requestOptions: RequestOptions? = null): ImageResponse

Edits referenced images using the current JSON contract and returns response metadata.

open suspend fun image(creation: ImageGenerationRequest, requestOptions: RequestOptions? = null): ImageResponse

Generates base64 images with response metadata. An explicit current image model is required.

Link copied to clipboard
open fun imageEvents(edit: ImageEditRequest, requestOptions: RequestOptions? = null): Flow<ImageEvent>

Streams edit events. Collection starts the request; cancellation closes its response. Service errors are emitted as error events.

open fun imageEvents(creation: ImageGenerationRequest, requestOptions: RequestOptions? = null): Flow<ImageEvent>

Streams generation events. Collection starts the request; cancellation closes its response. Service errors are emitted as error events.

Link copied to clipboard
abstract suspend fun imageJSON(creation: ImageCreation, requestOptions: RequestOptions? = null): List<ImageJSON>

Creates an image given a prompt. Get images as base 64 JSON.

abstract suspend fun imageJSON(edit: ImageEdit, requestOptions: RequestOptions? = null): List<ImageJSON>

Creates an edited or extended image given an original image and a prompt. Get images as base 64 JSON.

abstract suspend fun imageJSON(variation: ImageVariation, requestOptions: RequestOptions? = null): List<ImageJSON>

Creates a variation of a given image. Get images as base 64 JSON.

Link copied to clipboard
abstract suspend fun imageURL(creation: ImageCreation, requestOptions: RequestOptions? = null): List<ImageURL>

Creates an image given a prompt. Get images as URLs.

abstract suspend fun imageURL(edit: ImageEdit, requestOptions: RequestOptions? = null): List<ImageURL>

Creates an edited or extended image given an original image and a prompt. Get images as URLs.

abstract suspend fun imageURL(variation: ImageVariation, requestOptions: RequestOptions? = null): List<ImageURL>

Creates a variation of a given image. Get images as URLs.