runapi-runway 0.2.1 → 0.2.6

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: c214b2341bb03336e45e8d5b45ee17e767a976f48d8b3400d70a97c79c7f79aa
4
- data.tar.gz: 36e6813b94e61df19973e8f50081a43e23eb8f1662c5e33842a9f80df18115b2
3
+ metadata.gz: 136d7bef7e251f84697d1faec9be01a6771a3948f4c2df29711f8c5d335c2e42
4
+ data.tar.gz: 76c88350d5408ce93c05ddb25e49e90429c5e5e76f540d8993eb3738ab5c2c94
5
5
  SHA512:
6
- metadata.gz: b32644b41f4f0deaf8a79c4cae455c6a6f2ef81b582befeb445e2d19d53205484d9b4c156f69499f9946bdc2cef3d34db15a46835f1c3e9723f7d85a0e1ab162
7
- data.tar.gz: 8dad4c58ee7e1bd07c2deacbb07db763031209f112ffa9f30cd14718725176c125fb8febd4d52f576c5afb6d1aeef8488f484bd37f72c2df980539524de91e32
6
+ metadata.gz: c850f59712359438aa95bd65cebfcd3149f2f5b80d45378978f2b7a47b0190b308e12b220a4329ffd88535da128080e40d4eb43faa45a890e9431c43d6a782a0
7
+ data.tar.gz: adba718ecc15852b75fef465d757c9e6e6b922f68b5a2c91c4f83cb4b3fbeb517aa7718d3e25067c4abff473e5e38241647a0568f50c9165a9fc9384d9fc7f0d
data/README.md ADDED
@@ -0,0 +1,43 @@
1
+ # Runway API Ruby SDK for RunAPI
2
+
3
+ The runway api Ruby SDK is the language-specific package for Runway on RunAPI. Use this runway api package for text-to-video, image-to-video, video editing, and animation flows when your application needs JSON request bodies, task status lookup, and consistent RunAPI errors in Ruby.
4
+
5
+ This runway api README is the Ruby package guide inside the public `runway-sdk` repository. For the repository overview, start at `../README.md`; for model details, use https://runapi.ai/models/runway; for API reference, use https://runapi.ai/docs#runway; for SDK docs, use https://runapi.ai/docs#sdk-runway.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ gem install runapi-runway
11
+ ```
12
+
13
+ ## Quick start
14
+
15
+ ```ruby
16
+ require "runapi-runway"
17
+
18
+ client = RunApi::Runway::Client.new
19
+ task = client.text_to_video.create(
20
+ # Pass the Runway JSON request body from https://runapi.ai/docs#runway.
21
+ )
22
+ status = client.text_to_video.get(task.id)
23
+ ```
24
+
25
+ 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.
26
+
27
+ ## Language notes
28
+
29
+ Use Ruby keyword arguments and the `RunApi::Runway` error classes when building video jobs, Rails workers, or scripts. The available resources are `text_to_video` and `extend_video`. Keep `RUNAPI_API_KEY` in the environment or your secret manager; never commit API keys or callback secrets.
30
+
31
+ ## Links
32
+
33
+ - Model page: https://runapi.ai/models/runway
34
+ - SDK docs: https://runapi.ai/docs#sdk-runway
35
+ - Product docs: https://runapi.ai/docs#runway
36
+ - Pricing and rate limits: https://runapi.ai/models/runway
37
+ - Provider comparison: https://runapi.ai/providers/runway
38
+ - Full catalog: https://runapi.ai/models
39
+ - Repository: https://github.com/runapi-ai/runway-sdk
40
+
41
+ ## License
42
+
43
+ Licensed under the Apache License, Version 2.0.
@@ -32,11 +32,10 @@ module RunApi
32
32
  private
33
33
 
34
34
  def validate_params!(params)
35
- raise Core::ValidationError, "task_id is required" unless param(params, :task_id)
35
+ raise Core::ValidationError, "source_task_id is required" unless param(params, :source_task_id)
36
36
  raise Core::ValidationError, "prompt is required" unless param(params, :prompt)
37
- raise Core::ValidationError, "image_url is required" unless param(params, :image_url)
38
- raise Core::ValidationError, "quality is required" unless param(params, :quality)
39
- validate_optional!(params, :quality, Types::QUALITIES)
37
+ raise Core::ValidationError, "output_resolution is required" unless param(params, :output_resolution)
38
+ validate_optional!(params, :output_resolution, Types::OUTPUT_RESOLUTIONS)
40
39
  end
41
40
  end
42
41
  end
@@ -33,9 +33,9 @@ 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, "duration is required" unless param(params, :duration)
37
- raise Core::ValidationError, "quality is required" unless param(params, :quality)
38
- validate_optional!(params, :quality, Types::QUALITIES)
36
+ raise Core::ValidationError, "duration_seconds is required" unless param(params, :duration_seconds)
37
+ raise Core::ValidationError, "output_resolution is required" unless param(params, :output_resolution)
38
+ validate_optional!(params, :output_resolution, Types::OUTPUT_RESOLUTIONS)
39
39
  validate_optional!(params, :aspect_ratio, Types::ASPECT_RATIOS)
40
40
  end
41
41
  end
@@ -3,7 +3,7 @@
3
3
  module RunApi
4
4
  module Runway
5
5
  module Types
6
- QUALITIES = %w[720p 1080p].freeze
6
+ OUTPUT_RESOLUTIONS = %w[720p 1080p].freeze
7
7
  ASPECT_RATIOS = %w[16:9 9:16 1:1 4:3 3:4].freeze
8
8
 
9
9
  class Video < RunApi::Core::BaseModel
@@ -11,19 +11,23 @@ module RunApi
11
11
  required :url, String
12
12
  end
13
13
 
14
+ class Image < RunApi::Core::BaseModel
15
+ required :url, String
16
+ end
17
+
14
18
  class TaskResponse < RunApi::Core::TaskResponse
15
19
  required :id, String
16
20
  optional :status, String, enum: -> { RunApi::Core::TaskResponse::Status::ALL }
17
- optional :videos, [ -> { Video } ]
18
- optional :image_url, String
19
- optional :parent_task_id, String
21
+ optional :videos, [-> { Video }]
22
+ optional :images, [-> { Image }]
23
+ optional :source_task_id, String
20
24
  optional :error, String
21
25
  end
22
26
 
23
27
  class TaskCreateResponse < TaskResponse; end
24
28
 
25
29
  class CompletedTaskResponse < TaskResponse
26
- required :videos, [ -> { Video } ]
30
+ required :videos, [-> { Video }]
27
31
  end
28
32
  end
29
33
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runapi-runway
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - RunAPI
@@ -15,22 +15,27 @@ dependencies:
15
15
  requirements:
16
16
  - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: '0.1'
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: '0.1'
26
- description: RunAPI Runway SDK for JavaScript, Ruby, and Go
25
+ version: 0.2.5
26
+ description: The runway api Ruby SDK is the language-specific package for Runway on
27
+ RunAPI. Use this runway api package for text-to-video, image-to-video, video editing,
28
+ and animation flows when your application needs JSON request bodies, task status
29
+ lookup, and consistent RunAPI errors in Ruby.
27
30
  email:
28
31
  - contact@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.rb
35
40
  - lib/runapi/runway.rb
36
41
  - lib/runapi/runway/client.rb
@@ -42,7 +47,7 @@ licenses:
42
47
  - Apache-2.0
43
48
  metadata:
44
49
  homepage_uri: https://runapi.ai/models/runway
45
- documentation_uri: https://runapi.ai/models/runway
50
+ documentation_uri: https://github.com/runapi-ai/runway-sdk/blob/main/ruby/README.md
46
51
  source_code_uri: https://github.com/runapi-ai/runway-sdk
47
52
  changelog_uri: https://github.com/runapi-ai/runway-sdk/blob/main/CHANGELOG.md
48
53
  rdoc_options: []
@@ -59,7 +64,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
59
64
  - !ruby/object:Gem::Version
60
65
  version: '0'
61
66
  requirements: []
62
- rubygems_version: 4.0.6
67
+ rubygems_version: 4.0.10
63
68
  specification_version: 4
64
- summary: Runway API SDKs for JavaScript, Ruby, and Go on RunAPI.
69
+ summary: Runway API Ruby SDK for RunAPI
65
70
  test_files: []