Class: RunApi::HappyHorse::Client

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

Overview

HappyHorse video generation and editing API client.

Examples:

client = RunApi::HappyHorse::Client.new(api_key: "your-api-key")
result = client.text_to_video.run(
  model: "happyhorse-text-to-video", prompt: "A horse galloping across a sunset beach"
)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Client.



20
21
22
23
24
25
# File 'lib/runapi/happyhorse/client.rb', line 20

def initialize(api_key: nil, **options)
  super
  @text_to_video = Resources::TextToVideo.new(http)
  @image_to_video = Resources::ImageToVideo.new(http)
  @edit_video = Resources::EditVideo.new(http)
end

Instance Attribute Details

#edit_videoResources::EditVideo (readonly)

Returns Video editing with text prompts and reference images.

Returns:



18
19
20
# File 'lib/runapi/happyhorse/client.rb', line 18

def edit_video
  @edit_video
end

#image_to_videoResources::ImageToVideo (readonly)

Returns Image-to-video animation from a first-frame image.

Returns:



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

def image_to_video
  @image_to_video
end

#text_to_videoResources::TextToVideo (readonly)

Returns Text-to-video generation with optional character consistency.

Returns:



14
15
16
# File 'lib/runapi/happyhorse/client.rb', line 14

def text_to_video
  @text_to_video
end