class OpenAI::ImageRequest

Included Modules

Extended Modules

Defined in:

openai/api/image.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
def self.new(prompt : String, num_images : Int32 = 1, size : OpenAI::ImageSize = :large, response_format : OpenAI::ImageRespFormat = :url, user : Nil | String = nil) #

[View source]

Instance Method Detail

def num_images : Int32 #

[View source]
def num_images=(num_images : Int32) #

[View source]
def prompt : String #

A text description of the desired image(s). The maximum length is 1000 characters.


[View source]
def prompt=(prompt : String) #

A text description of the desired image(s). The maximum length is 1000 characters.


[View source]
def response_format : ImageRespFormat #

The format in which the generated images are returned.


[View source]
def response_format=(response_format : ImageRespFormat) #

The format in which the generated images are returned.


[View source]
def size : ImageSize #

The size of the generated images


[View source]
def size=(size : ImageSize) #

The size of the generated images


[View source]
def user : String | Nil #

A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.


[View source]
def user=(user : String | Nil) #

A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.


[View source]