Class: RunApi::Omnihuman::Client

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

Overview

OmniHuman talking-head video generation client with helper endpoints for human identification and subject-mask detection.

Examples:

client = RunApi::Omnihuman::Client.new(api_key: "sk-...")
result = client.audio_to_video.run(
  model: "omnihuman-1.5",
  source_image_url: "https://cdn.runapi.ai/public/samples/portrait.jpg",
  source_audio_url: "https://cdn.runapi.ai/public/samples/voice.mp3"
)
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.



22
23
24
25
26
27
# File 'lib/runapi/omnihuman/client.rb', line 22

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

Instance Attribute Details

#audio_to_videoResources::AudioToVideo, ... (readonly)

Returns:



20
21
22
# File 'lib/runapi/omnihuman/client.rb', line 20

def audio_to_video
  @audio_to_video
end

#human_identificationResources::AudioToVideo, ... (readonly)

Returns:



20
21
22
# File 'lib/runapi/omnihuman/client.rb', line 20

def human_identification
  @human_identification
end

#subject_detectionResources::AudioToVideo, ... (readonly)

Returns:



20
21
22
# File 'lib/runapi/omnihuman/client.rb', line 20

def subject_detection
  @subject_detection
end