runapi-runway-aleph 0.2.1 → 0.2.5
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: 56167311723e82f55c4fb956d06b4341f787b73b69a107e12e22d318ecd8366e
|
|
4
|
+
data.tar.gz: 93d5a544147ec1d698971b76ca604926ccd391585ff149c5685e7cb3ea391b71
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7564b5a2e8bcd99e638505fbcf55d87c51ac77c5b2f91a8d8e28b9a4af51acc833167cc8505e6e8dd0f83ed8e0a158602ad7b4e1e8f520ec2b5c9d83967dd44e
|
|
7
|
+
data.tar.gz: b63e2ba44057ea67f67fea3bf7f58aa5724979170b300edc8c7c53f5285196b4125b10d641d8e4f0651e264aae0d1a36eff0765074e2c9f48bdaa0aa40ad6713
|
data/README.md
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Runway Aleph API Ruby SDK for RunAPI
|
|
2
|
+
|
|
3
|
+
The runway aleph api Ruby SDK is the language-specific package for Runway Aleph on RunAPI. Use this runway aleph api package for prompt-guided video editing when your application needs JSON request bodies, task status lookup, and consistent RunAPI errors in Ruby.
|
|
4
|
+
|
|
5
|
+
This runway aleph api 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
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
gem install runapi-runway_aleph
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Quick start
|
|
14
|
+
|
|
15
|
+
```ruby
|
|
16
|
+
require "runapi-runway_aleph"
|
|
17
|
+
|
|
18
|
+
client = RunApi::RunwayAleph::Client.new
|
|
19
|
+
task = client.edit_video.create(
|
|
20
|
+
model: "runway-aleph",
|
|
21
|
+
prompt: "Transform the scene into a watercolor painting style",
|
|
22
|
+
video_url: "https://cdn.runapi.ai/public/samples/video.mp4"
|
|
23
|
+
)
|
|
24
|
+
status = client.edit_video.get(task.id)
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Use `create` when you want to submit a task and return quickly, `get` when you need the latest task state, and `run` when a script should create and poll until completion. In web request handlers, prefer `create` plus webhook or later `get` polling so a worker is not held open.
|
|
28
|
+
|
|
29
|
+
## Language notes
|
|
30
|
+
|
|
31
|
+
Use Ruby keyword arguments and the `RunApi::RunwayAleph` error classes when building video jobs, Rails workers, or scripts. Keep `RUNAPI_API_KEY` in the environment or your secret manager; never commit API keys or callback secrets.
|
|
32
|
+
|
|
33
|
+
## Links
|
|
34
|
+
|
|
35
|
+
- Model page: https://runapi.ai/models/runway-aleph
|
|
36
|
+
- SDK docs: https://runapi.ai/docs#sdk-runway-aleph
|
|
37
|
+
- Product docs: https://runapi.ai/docs#runway-aleph
|
|
38
|
+
- Pricing and rate limits: https://runapi.ai/models/runway-aleph
|
|
39
|
+
- Provider comparison: https://runapi.ai/providers/runway
|
|
40
|
+
- Full catalog: https://runapi.ai/models
|
|
41
|
+
- Repository: https://github.com/runapi-ai/runway-aleph-sdk
|
|
42
|
+
|
|
43
|
+
## License
|
|
44
|
+
|
|
45
|
+
Licensed under the Apache License, Version 2.0.
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
module RunApi
|
|
4
4
|
module RunwayAleph
|
|
5
5
|
class Client
|
|
6
|
-
attr_reader :
|
|
6
|
+
attr_reader :edit_video
|
|
7
7
|
|
|
8
8
|
def initialize(api_key: nil, **options)
|
|
9
9
|
@api_key = Core::Auth.resolve_api_key(api_key)
|
|
10
10
|
|
|
11
11
|
client_options = Core::ClientOptions.new(api_key: @api_key, **options)
|
|
12
12
|
http = client_options.http_client || Core::HttpClient.new(client_options)
|
|
13
|
-
@
|
|
13
|
+
@edit_video = Resources::EditVideo.new(http)
|
|
14
14
|
end
|
|
15
15
|
end
|
|
16
16
|
end
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
module RunApi
|
|
4
4
|
module RunwayAleph
|
|
5
5
|
module Resources
|
|
6
|
-
class
|
|
6
|
+
class EditVideo
|
|
7
7
|
include RunApi::Core::ResourceHelpers
|
|
8
8
|
|
|
9
|
-
ENDPOINT = "/api/v1/runway_aleph/
|
|
9
|
+
ENDPOINT = "/api/v1/runway_aleph/edit_video"
|
|
10
10
|
RESPONSE_CLASS = Types::TaskCreateResponse
|
|
11
|
-
COMPLETED_RESPONSE_CLASS = Types::
|
|
11
|
+
COMPLETED_RESPONSE_CLASS = Types::CompletedEditVideoResponse
|
|
12
12
|
|
|
13
13
|
def initialize(http)
|
|
14
14
|
@http = http
|
|
@@ -33,7 +33,7 @@ module RunApi
|
|
|
33
33
|
|
|
34
34
|
def validate_params!(params)
|
|
35
35
|
raise Core::ValidationError, "prompt is required" unless param(params, :prompt)
|
|
36
|
-
raise Core::ValidationError, "
|
|
36
|
+
raise Core::ValidationError, "source_video_url is required" unless param(params, :source_video_url)
|
|
37
37
|
validate_optional!(params, :aspect_ratio, Types::ASPECT_RATIOS)
|
|
38
38
|
end
|
|
39
39
|
end
|
|
@@ -10,19 +10,22 @@ module RunApi
|
|
|
10
10
|
required :url, String
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
-
class
|
|
13
|
+
class Image < RunApi::Core::BaseModel
|
|
14
|
+
required :url, String
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
class EditVideoResponse < RunApi::Core::TaskResponse
|
|
14
18
|
required :id, String
|
|
15
19
|
optional :status, String, enum: -> { RunApi::Core::TaskResponse::Status::ALL }
|
|
16
|
-
optional :videos, [
|
|
17
|
-
optional :
|
|
18
|
-
optional :parent_task_id, String
|
|
20
|
+
optional :videos, [-> { Video }]
|
|
21
|
+
optional :images, [-> { Image }]
|
|
19
22
|
optional :error, String
|
|
20
23
|
end
|
|
21
24
|
|
|
22
|
-
class TaskCreateResponse <
|
|
25
|
+
class TaskCreateResponse < EditVideoResponse; end
|
|
23
26
|
|
|
24
|
-
class
|
|
25
|
-
required :videos, [
|
|
27
|
+
class CompletedEditVideoResponse < EditVideoResponse
|
|
28
|
+
required :videos, [-> { Video }]
|
|
26
29
|
end
|
|
27
30
|
end
|
|
28
31
|
end
|
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.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- RunAPI
|
|
@@ -15,31 +15,40 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - "~>"
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version:
|
|
18
|
+
version: 0.2.5
|
|
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:
|
|
26
|
-
description:
|
|
25
|
+
version: 0.2.5
|
|
26
|
+
description: The runway aleph api Ruby SDK is the language-specific package for Runway
|
|
27
|
+
Aleph on RunAPI. Use this runway aleph api package for prompt-guided video editing
|
|
28
|
+
when your application needs JSON request bodies, task status lookup, and consistent
|
|
29
|
+
RunAPI errors in Ruby.
|
|
27
30
|
email:
|
|
28
31
|
- support@runapi.ai
|
|
29
32
|
executables: []
|
|
30
33
|
extensions: []
|
|
31
|
-
extra_rdoc_files:
|
|
34
|
+
extra_rdoc_files:
|
|
35
|
+
- README.md
|
|
32
36
|
files:
|
|
33
37
|
- LICENSE
|
|
38
|
+
- README.md
|
|
34
39
|
- lib/runapi-runway_aleph.rb
|
|
35
40
|
- lib/runapi/runway_aleph.rb
|
|
36
41
|
- lib/runapi/runway_aleph/client.rb
|
|
37
|
-
- lib/runapi/runway_aleph/resources/
|
|
42
|
+
- lib/runapi/runway_aleph/resources/edit_video.rb
|
|
38
43
|
- lib/runapi/runway_aleph/types.rb
|
|
39
44
|
homepage: https://runapi.ai/models/runway-aleph
|
|
40
45
|
licenses:
|
|
41
46
|
- Apache-2.0
|
|
42
|
-
metadata:
|
|
47
|
+
metadata:
|
|
48
|
+
homepage_uri: https://runapi.ai/models/runway-aleph
|
|
49
|
+
documentation_uri: https://github.com/runapi-ai/runway-aleph-sdk/blob/main/ruby/README.md
|
|
50
|
+
source_code_uri: https://github.com/runapi-ai/runway-aleph-sdk
|
|
51
|
+
changelog_uri: https://github.com/runapi-ai/runway-aleph-sdk/blob/main/CHANGELOG.md
|
|
43
52
|
rdoc_options: []
|
|
44
53
|
require_paths:
|
|
45
54
|
- lib
|
|
@@ -54,7 +63,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
54
63
|
- !ruby/object:Gem::Version
|
|
55
64
|
version: '0'
|
|
56
65
|
requirements: []
|
|
57
|
-
rubygems_version: 4.0.
|
|
66
|
+
rubygems_version: 4.0.10
|
|
58
67
|
specification_version: 4
|
|
59
|
-
summary: Runway Aleph API
|
|
68
|
+
summary: Runway Aleph API Ruby SDK for RunAPI
|
|
60
69
|
test_files: []
|