Class: RunApi::Veo31::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/runapi/veo_3_1/client.rb

Overview

Veo 3.1 video API client.

Examples:

client = RunApi::Veo31::Client.new(api_key: "your-api-key")
result = client.text_to_video.run(
  model: "veo-3.1-fast", prompt: "A drone shot over mountains at sunset"
)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_key: nil, **options) ⇒ Client

Returns a new instance of Client.



18
19
20
21
22
23
24
25
26
# File 'lib/runapi/veo_3_1/client.rb', line 18

def initialize(api_key: nil, **options)
  @api_key = Core::Auth.resolve_api_key(api_key)

  client_options = Core::ClientOptions.new(api_key: @api_key, **options)
  http = client_options.http_client || Core::HttpClient.new(client_options)
  @text_to_video = Resources::TextToVideo.new(http)
  @extend_video = Resources::ExtendVideo.new(http)
  @upscale_video = Resources::UpscaleVideo.new(http)
end

Instance Attribute Details

#extend_videoResources::TextToVideo, ... (readonly)

Returns:



16
17
18
# File 'lib/runapi/veo_3_1/client.rb', line 16

def extend_video
  @extend_video
end

#text_to_videoResources::TextToVideo, ... (readonly)

Returns:



16
17
18
# File 'lib/runapi/veo_3_1/client.rb', line 16

def text_to_video
  @text_to_video
end

#upscale_videoResources::TextToVideo, ... (readonly)

Returns:



16
17
18
# File 'lib/runapi/veo_3_1/client.rb', line 16

def upscale_video
  @upscale_video
end