Class: RunApi::GrokImagine::Client
- Inherits:
-
Object
- Object
- RunApi::GrokImagine::Client
- Defined in:
- lib/runapi/grok_imagine/client.rb
Overview
Grok-Imagine multimodal generation API client.
Instance Attribute Summary collapse
- #extensions ⇒ Resources::Extensions readonly
- #image_to_image ⇒ Resources::ImageToImage readonly
- #image_to_video ⇒ Resources::ImageToVideo readonly
- #text_to_image ⇒ Resources::TextToImage readonly
- #text_to_video ⇒ Resources::TextToVideo readonly
- #upscales ⇒ Resources::Upscales readonly
Instance Method Summary collapse
-
#initialize(api_key: nil, **options) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(api_key: nil, **options) ⇒ Client
Returns a new instance of Client.
28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/runapi/grok_imagine/client.rb', line 28 def initialize(api_key: nil, **) @api_key = Core::Auth.resolve_api_key(api_key) = Core::ClientOptions.new(api_key: @api_key, **) http = .http_client || Core::HttpClient.new() @text_to_video = Resources::TextToVideo.new(http) @image_to_video = Resources::ImageToVideo.new(http) @text_to_image = Resources::TextToImage.new(http) @image_to_image = Resources::ImageToImage.new(http) @extensions = Resources::Extensions.new(http) @upscales = Resources::Upscales.new(http) end |
Instance Attribute Details
#extensions ⇒ Resources::Extensions (readonly)
24 25 26 |
# File 'lib/runapi/grok_imagine/client.rb', line 24 def extensions @extensions end |
#image_to_image ⇒ Resources::ImageToImage (readonly)
22 23 24 |
# File 'lib/runapi/grok_imagine/client.rb', line 22 def image_to_image @image_to_image end |
#image_to_video ⇒ Resources::ImageToVideo (readonly)
18 19 20 |
# File 'lib/runapi/grok_imagine/client.rb', line 18 def image_to_video @image_to_video end |
#text_to_image ⇒ Resources::TextToImage (readonly)
20 21 22 |
# File 'lib/runapi/grok_imagine/client.rb', line 20 def text_to_image @text_to_image end |
#text_to_video ⇒ Resources::TextToVideo (readonly)
16 17 18 |
# File 'lib/runapi/grok_imagine/client.rb', line 16 def text_to_video @text_to_video end |
#upscales ⇒ Resources::Upscales (readonly)
26 27 28 |
# File 'lib/runapi/grok_imagine/client.rb', line 26 def upscales @upscales end |