struct

OpenRouter::ImageConfig

Inherits JSON::Serializable < Struct < Value < Object

Configuration for image generation requests.

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

Constructors

new(aspect_ratio : String | Nil = nil, image_size : String | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

aspect_ratio

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

Source
aspect_ratio=(aspect_ratio : String | Nil)

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

Source
image_size

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

Source
image_size=(image_size : String | Nil)

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

Source