Class: RunApi::PixVerse::Client

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

Overview

PixVerse V6 video generation, editing, transition, and extension API client.

Examples:

client = RunApi::PixVerse::Client.new(api_key: "your-api-key")
result = client.text_to_video.run(
  model: "pixverse-v6", prompt: "A horse galloping across a sunset beach",
  output_resolution: "720p", duration_seconds: 5, aspect_ratio: "16:9"
)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Client.



23
24
25
26
27
28
29
30
# File 'lib/runapi/pixverse/client.rb', line 23

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)
  @transition_video = Resources::TransitionVideo.new(http)
  @extend_video = Resources::ExtendVideo.new(http)
end

Instance Attribute Details

#edit_videoResources::EditVideo (readonly)

Returns Video editing with text prompts and reference images.

Returns:



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

def edit_video
  @edit_video
end

#extend_videoObject (readonly)

Returns the value of attribute extend_video.



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

def extend_video
  @extend_video
end

#image_to_videoResources::ImageToVideo (readonly)

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

Returns:



17
18
19
# File 'lib/runapi/pixverse/client.rb', line 17

def image_to_video
  @image_to_video
end

#text_to_videoResources::TextToVideo (readonly)

Returns Text-to-video generation.

Returns:



15
16
17
# File 'lib/runapi/pixverse/client.rb', line 15

def text_to_video
  @text_to_video
end

#transition_videoObject (readonly)

Returns the value of attribute transition_video.



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

def transition_video
  @transition_video
end