Module: RunApi::Imagen4::Types

Defined in:
lib/runapi/imagen_4/types.rb

Overview

Imagen 4 type constants and response models. Text-to-image supports three quality tiers; remix accepts source images with extended aspect ratios, resolution, and format control.

Defined Under Namespace

Classes: CompletedRemixImageResponse, CompletedTextToImageResponse, Image, RemixImageResponse, TextToImageResponse

Constant Summary collapse

TEXT_MODELS =
%w[imagen-4 imagen-4-fast imagen-4-ultra].freeze
REMIX_MODELS =
%w[imagen-4-pro-remix-image].freeze
MODELS =
(TEXT_MODELS + REMIX_MODELS).freeze
TEXT_ASPECT_RATIOS =
%w[1:1 16:9 9:16 3:4 4:3].freeze
PRO_ASPECT_RATIOS =

Extended aspect ratios for remix, including “auto” which infers from source images.

%w[1:1 2:3 3:2 3:4 4:3 4:5 5:4 9:16 16:9 21:9 auto].freeze
OUTPUT_RESOLUTIONS =
%w[1k 2k 4k].freeze
OUTPUT_FORMATS =
%w[png jpg].freeze
OUTPUT_COUNTS =

Batch sizes for imagen-4-fast (the only model supporting multi-image output).

[1, 2, 3, 4].freeze