All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.com.aallam.openai.client.Images.kt Maven / Gradle / Ivy

There is a newer version: 4.0.0-beta01
Show newest version
package com.aallam.openai.client

import com.aallam.openai.api.ExperimentalOpenAI
import com.aallam.openai.api.image.*

/**
 * Given a prompt and/or an input image, the model will generate a new image.
 */
public interface Images {

    /**
     * Creates an image given a prompt.
     * Get images as URLs.
     */
    @ExperimentalOpenAI
    public suspend fun image(creation: ImageCreationURL): List

    /**
     * Creates an image given a prompt.
     * Get images as base 64 JSON.
     */
    @ExperimentalOpenAI
    public suspend fun image(creation: ImageCreationJSON): List

    /**
     * Creates an edited or extended image given an original image and a prompt.
     * Get images as URLs.
     */
    @ExperimentalOpenAI
    public suspend fun image(edit: ImageEditURL): List

    /**
     * Creates an edited or extended image given an original image and a prompt.
     * Get images as base 64 JSON.
     */
    @ExperimentalOpenAI
    public suspend fun image(edit: ImageEditJSON): List

    /**
     * Creates a variation of a given image.
     * Get images as URLs.
     */
    @ExperimentalOpenAI
    public suspend fun image(variation: ImageVariationURL): List

    /**
     * Creates a variation of a given image.
     * Get images as base 64 JSON.
     */
    @ExperimentalOpenAI
    public suspend fun image(variation: ImageVariationJSON): List
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy