class AI::OpenAI::OpenAIImageModel

Overview

OpenAI Image Model.

Implements the ImageModelV3 interface for generating and editing images using OpenAI's DALL-E and GPT-Image APIs.

Included Modules

Defined in:

ai/openai/image/openai_image_model.cr

Constructors

Instance Method Summary

Instance methods inherited from module AI::Provider::ImageModel::V3

do_generate(options : CallOptions) : Result do_generate, max_images_per_call : Int32 | Nil max_images_per_call, model_id : String model_id, provider : String provider, specification_version : String specification_version

Constructor Detail

def self.new(model_id : OpenAIImageModelId, config : OpenAIConfig, current_date_proc : Proc(Time) | Nil = nil) #

[View source]

Instance Method Detail

Generates images from a text prompt.


[View source]
def max_images_per_call : Int32 | Nil #

Returns the maximum images per call for this model.


[View source]
def model_id : OpenAIImageModelId #

The model ID.


[View source]
def provider : String #

Returns the provider name.


[View source]
def specification_version : String #

Returns the specification version.


[View source]