runapi-runway-aleph 0.2.6 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bb42250458bd715b11cf906d442464db0b72bef068064cc5f146ab523311c5e4
|
|
4
|
+
data.tar.gz: '079ac40cc707ac1926bb61f42e6f457f25d90370a5d8553f6e4fcaaa6b5772c3'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0a4bb38cd68b19705714d3bb22f105bcaf2f34586201d5cba595b286abdda34ad0cafb598a42b28a0e26338a13e6fe4ad1712dafd0327bb812b25048bc6c24bd
|
|
7
|
+
data.tar.gz: 9b3b4becf9d920b1c287094bdf5ab64a044f78fc2f4469c7253915726fc36f51081f4a352117ba76cec3ba5974ec70c5d68ab7b330a3db366e37b51eb147870b
|
data/README.md
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
# Runway Aleph
|
|
1
|
+
# Runway Aleph Ruby SDK for RunAPI
|
|
2
2
|
|
|
3
|
-
The
|
|
3
|
+
The Runway Aleph Ruby SDK is the language-specific package for Runway Aleph on RunAPI. Use this package for video generation, animation, and video editing workflows when your application needs request bodies, task status lookup, and consistent RunAPI errors in Ruby.
|
|
4
4
|
|
|
5
|
-
This
|
|
5
|
+
This README is the Ruby package guide inside the public `runway-aleph-sdk` repository. For the repository overview, start at `../README.md`; for model details, use https://runapi.ai/models/runway-aleph; for API reference, use https://runapi.ai/docs#runway-aleph; for SDK docs, use https://runapi.ai/docs#sdk-runway-aleph.
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
gem install runapi-
|
|
10
|
+
gem install runapi-runway-aleph
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
## Quick start
|
|
14
14
|
|
|
15
15
|
```ruby
|
|
16
|
-
require "runapi-
|
|
16
|
+
require "runapi-runway-aleph"
|
|
17
17
|
|
|
18
18
|
client = RunApi::RunwayAleph::Client.new
|
|
19
19
|
task = client.edit_video.create(
|
|
@@ -10,7 +10,7 @@ module RunApi
|
|
|
10
10
|
# client = RunApi::RunwayAleph::Client.new(api_key: "your-api-key")
|
|
11
11
|
# result = client.edit_video.run(
|
|
12
12
|
# prompt: "Make it look like a watercolor painting",
|
|
13
|
-
# source_video_url: "https://
|
|
13
|
+
# source_video_url: "https://cdn.runapi.ai/public/samples/video.mp4"
|
|
14
14
|
# )
|
|
15
15
|
class Client < RunApi::Core::Client
|
|
16
16
|
# @return [Resources::EditVideo] Prompt-driven video editing with optional style reference.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module RunApi
|
|
4
|
+
module RunwayAleph
|
|
5
|
+
CONTRACT = {
|
|
6
|
+
"edit-video" => {
|
|
7
|
+
"models" => ["runway-aleph"],
|
|
8
|
+
"fields_by_model" => {
|
|
9
|
+
"runway-aleph" => {
|
|
10
|
+
"aspect_ratio" => {
|
|
11
|
+
"enum" => ["16:9", "9:16", "4:3", "3:4", "1:1", "21:9"]
|
|
12
|
+
},
|
|
13
|
+
"prompt" => {
|
|
14
|
+
"required" => true
|
|
15
|
+
},
|
|
16
|
+
"seed" => {
|
|
17
|
+
"type" => "integer"
|
|
18
|
+
},
|
|
19
|
+
"source_video_url" => {
|
|
20
|
+
"required" => true
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}.freeze
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -11,6 +11,7 @@ module RunApi
|
|
|
11
11
|
ENDPOINT = "/api/v1/runway_aleph/edit_video"
|
|
12
12
|
RESPONSE_CLASS = Types::TaskCreateResponse
|
|
13
13
|
COMPLETED_RESPONSE_CLASS = Types::CompletedEditVideoResponse
|
|
14
|
+
MODEL = "runway-aleph"
|
|
14
15
|
|
|
15
16
|
def initialize(http)
|
|
16
17
|
@http = http
|
|
@@ -31,7 +32,7 @@ module RunApi
|
|
|
31
32
|
# @return [RunApi::RunwayAleph::Types::TaskCreateResponse] task creation result with id
|
|
32
33
|
def create(**params)
|
|
33
34
|
params = compact_params(params)
|
|
34
|
-
|
|
35
|
+
validate_contract!(CONTRACT["edit-video"], params.merge(model: MODEL))
|
|
35
36
|
request(:post, ENDPOINT, body: params)
|
|
36
37
|
end
|
|
37
38
|
|
|
@@ -42,14 +43,6 @@ module RunApi
|
|
|
42
43
|
def get(id)
|
|
43
44
|
request(:get, "#{ENDPOINT}/#{id}")
|
|
44
45
|
end
|
|
45
|
-
|
|
46
|
-
private
|
|
47
|
-
|
|
48
|
-
def validate_params!(params)
|
|
49
|
-
raise Core::ValidationError, "prompt is required" unless param(params, :prompt)
|
|
50
|
-
raise Core::ValidationError, "source_video_url is required" unless param(params, :source_video_url)
|
|
51
|
-
validate_optional!(params, :aspect_ratio, Types::ASPECT_RATIOS)
|
|
52
|
-
end
|
|
53
46
|
end
|
|
54
47
|
end
|
|
55
48
|
end
|
|
@@ -4,9 +4,6 @@ module RunApi
|
|
|
4
4
|
module RunwayAleph
|
|
5
5
|
# Type definitions and constants for Runway Aleph video editing.
|
|
6
6
|
module Types
|
|
7
|
-
# Output aspect ratio options. Includes 21:9 ultra-wide for cinematic letterbox output.
|
|
8
|
-
ASPECT_RATIOS = %w[16:9 9:16 4:3 3:4 1:1 21:9].freeze
|
|
9
|
-
|
|
10
7
|
# A generated output video.
|
|
11
8
|
class Video < RunApi::Core::BaseModel
|
|
12
9
|
optional :id, String
|
data/lib/runapi/runway_aleph.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: runapi-runway-aleph
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- RunAPI
|
|
@@ -15,17 +15,17 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - "~>"
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 0.2.
|
|
18
|
+
version: 0.2.7
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - "~>"
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: 0.2.
|
|
26
|
-
description: The
|
|
27
|
-
Aleph on RunAPI. Use this
|
|
28
|
-
when your application needs
|
|
25
|
+
version: 0.2.7
|
|
26
|
+
description: The Runway Aleph Ruby SDK is the language-specific package for Runway
|
|
27
|
+
Aleph on RunAPI. Use this package for video generation, animation, and video editing
|
|
28
|
+
workflows when your application needs request bodies, task status lookup, and consistent
|
|
29
29
|
RunAPI errors in Ruby.
|
|
30
30
|
email:
|
|
31
31
|
- support@runapi.ai
|
|
@@ -39,15 +39,18 @@ files:
|
|
|
39
39
|
- lib/runapi-runway_aleph.rb
|
|
40
40
|
- lib/runapi/runway_aleph.rb
|
|
41
41
|
- lib/runapi/runway_aleph/client.rb
|
|
42
|
+
- lib/runapi/runway_aleph/contract_gen.rb
|
|
42
43
|
- lib/runapi/runway_aleph/resources/edit_video.rb
|
|
43
44
|
- lib/runapi/runway_aleph/types.rb
|
|
44
45
|
homepage: https://runapi.ai/models/runway-aleph
|
|
45
46
|
licenses:
|
|
46
47
|
- Apache-2.0
|
|
47
48
|
metadata:
|
|
49
|
+
runapi_slug: runway-aleph
|
|
48
50
|
homepage_uri: https://runapi.ai/models/runway-aleph
|
|
49
51
|
documentation_uri: https://github.com/runapi-ai/runway-aleph-sdk/blob/main/ruby/README.md
|
|
50
52
|
source_code_uri: https://github.com/runapi-ai/runway-aleph-sdk
|
|
53
|
+
bug_tracker_uri: https://github.com/runapi-ai/runway-aleph-sdk/issues
|
|
51
54
|
changelog_uri: https://github.com/runapi-ai/runway-aleph-sdk/blob/main/CHANGELOG.md
|
|
52
55
|
rdoc_options: []
|
|
53
56
|
require_paths:
|
|
@@ -65,5 +68,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
65
68
|
requirements: []
|
|
66
69
|
rubygems_version: 4.0.10
|
|
67
70
|
specification_version: 4
|
|
68
|
-
summary: Runway Aleph
|
|
71
|
+
summary: Runway Aleph Ruby SDK for RunAPI
|
|
69
72
|
test_files: []
|