Class: RunApi::Wan::Client
- Inherits:
-
Core::Client
- Object
- Core::Client
- RunApi::Wan::Client
- Defined in:
- lib/runapi/wan/client.rb
Overview
Wan video and image generation API client.
Spans multiple generation families (2.2 through 2.7) with progressive capability upgrades. Feature availability varies by model variant.
Instance Attribute Summary collapse
-
#animate ⇒ Resources::Animate
readonly
Transfer motion from a reference video onto a subject image (move or replace).
-
#edit_video ⇒ Resources::EditVideo
readonly
Modify existing videos guided by text prompts and optional reference images.
-
#image_to_video ⇒ Resources::ImageToVideo
readonly
Generate videos driven by a source image.
-
#speech_to_video ⇒ Resources::SpeechToVideo
readonly
Generate lip-synced talking-head videos from a portrait image and speech audio.
-
#text_to_image ⇒ Resources::TextToImage
readonly
Generate images with optional color palette, bounding box, and thinking mode.
-
#text_to_video ⇒ Resources::TextToVideo
readonly
Generate videos from text prompts.
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.
30 31 32 33 34 35 36 37 38 39 |
# File 'lib/runapi/wan/client.rb', line 30 def initialize(api_key: nil, **) super @text_to_video = Resources::TextToVideo.new(http) @image_to_video = Resources::ImageToVideo.new(http) @speech_to_video = Resources::SpeechToVideo.new(http) @animate = Resources::Animate.new(http) @text_to_image = Resources::TextToImage.new(http) @edit_video = Resources::EditVideo.new(http) end |
Instance Attribute Details
#animate ⇒ Resources::Animate (readonly)
Returns Transfer motion from a reference video onto a subject image (move or replace).
24 25 26 |
# File 'lib/runapi/wan/client.rb', line 24 def animate @animate end |
#edit_video ⇒ Resources::EditVideo (readonly)
Returns Modify existing videos guided by text prompts and optional reference images.
28 29 30 |
# File 'lib/runapi/wan/client.rb', line 28 def edit_video @edit_video end |
#image_to_video ⇒ Resources::ImageToVideo (readonly)
Returns Generate videos driven by a source image. Flash variants trade fidelity for speed.
20 21 22 |
# File 'lib/runapi/wan/client.rb', line 20 def image_to_video @image_to_video end |
#speech_to_video ⇒ Resources::SpeechToVideo (readonly)
Returns Generate lip-synced talking-head videos from a portrait image and speech audio.
22 23 24 |
# File 'lib/runapi/wan/client.rb', line 22 def speech_to_video @speech_to_video end |
#text_to_image ⇒ Resources::TextToImage (readonly)
Returns Generate images with optional color palette, bounding box, and thinking mode.
26 27 28 |
# File 'lib/runapi/wan/client.rb', line 26 def text_to_image @text_to_image end |
#text_to_video ⇒ Resources::TextToVideo (readonly)
Returns Generate videos from text prompts. Supports turbo (2.2) through 2.7 with progressive features.
18 19 20 |
# File 'lib/runapi/wan/client.rb', line 18 def text_to_video @text_to_video end |