struct OpenRouter::ImageConfig

Overview

Configuration for image generation requests.

Used with CompletionRequest#image_config when requesting image output from models that support the image modality.

Included Modules

Defined in:

openrouter/types/image_config.cr

Constructors

Instance Method Summary

Constructor Detail

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

[View source]
def self.new(aspect_ratio : String | Nil = nil, image_size : String | Nil = nil) #

[View source]

Instance Method Detail

def aspect_ratio : String | Nil #

Aspect ratio of the generated image, e.g. "1:1", "16:9", "21:9"


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

Aspect ratio of the generated image, e.g. "1:1", "16:9", "21:9"


[View source]
def image_size : String | Nil #

Resolution of the generated image: "0.5K", "1K", "2K", or "4K"


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

Resolution of the generated image: "0.5K", "1K", "2K", or "4K"


[View source]