OpenAIImageClient

org.llm4s.imagegeneration.provider.OpenAIImageClient
See theOpenAIImageClient companion object
class OpenAIImageClient(config: OpenAIConfig, httpClient: HttpClient) extends ImageGenerationClient

OpenAI Images API client for image generation.

Supports GPT Image models and legacy DALL-E models.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

override def editImage(imagePath: Path, prompt: String, maskPath: Option[Path], options: ImageEditOptions): Either[ImageGenerationError, Seq[GeneratedImage]]

Edit an existing image based on a prompt and optional mask

Edit an existing image based on a prompt and optional mask

Attributes

Definition Classes
override def editImageAsync(imagePath: Path, prompt: String, maskPath: Option[Path], options: ImageEditOptions)(implicit ec: ExecutionContext): Future[Either[ImageGenerationError, Seq[GeneratedImage]]]

Edit an existing image asynchronously

Edit an existing image asynchronously

Attributes

Definition Classes
override def generateImage(prompt: String, options: ImageGenerationOptions): Either[ImageGenerationError, GeneratedImage]

Generate an image from a text prompt

Generate an image from a text prompt

Attributes

Definition Classes
override def generateImageAsync(prompt: String, options: ImageGenerationOptions)(implicit ec: ExecutionContext): Future[Either[ImageGenerationError, GeneratedImage]]

Generate an image asynchronously

Generate an image asynchronously

Attributes

Definition Classes
override def generateImages(prompt: String, count: Int, options: ImageGenerationOptions): Either[ImageGenerationError, Seq[GeneratedImage]]

Generate multiple images from a text prompt

Generate multiple images from a text prompt

Attributes

Definition Classes
override def generateImagesAsync(prompt: String, count: Int, options: ImageGenerationOptions)(implicit ec: ExecutionContext): Future[Either[ImageGenerationError, Seq[GeneratedImage]]]

Generate multiple images asynchronously

Generate multiple images asynchronously

Attributes

Definition Classes
override def health(): Either[ImageGenerationError, ServiceStatus]

Check the health/status of the image generation service

Check the health/status of the image generation service

Attributes

Definition Classes