Class: RunApi::Infinitetalk::Client

Inherits:
Core::Client
  • Object
show all
Defined in:
lib/runapi/infinitetalk/client.rb

Overview

InfiniteTalk lip-sync video generation client. Produces talking-head videos by animating a portrait image to match an audio track’s speech or singing.

Examples:

client = RunApi::Infinitetalk::Client.new(api_key: "sk-...")
result = client.audio_to_video.run(
  model: "infinitetalk-from-audio",
  source_image_url: "https://example.com/portrait.jpg",
  source_audio_url: "https://example.com/voice.mp3",
  prompt: "A young woman talking on a podcast"
)
puts result.videos.first.url

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Client.



21
22
23
24
# File 'lib/runapi/infinitetalk/client.rb', line 21

def initialize(api_key: nil, **options)
  super
  @audio_to_video = Resources::AudioToVideo.new(http)
end

Instance Attribute Details

#audio_to_videoResources::AudioToVideo (readonly)

Returns Lip-synced video generation from a portrait image and audio track.

Returns:



19
20
21
# File 'lib/runapi/infinitetalk/client.rb', line 19

def audio_to_video
  @audio_to_video
end