runapi-seedance 0.2.12 → 0.2.13
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 +4 -4
- data/README.md +5 -5
- data/lib/runapi/seedance/contract_gen.rb +1 -22
- data/lib/runapi/seedance/resources/text_to_video.rb +2 -2
- data/lib/runapi/seedance/types.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f3dcc0a950a3026f93a84fd54d89c249abd48daaf512b5717213dc7583d150b7
|
|
4
|
+
data.tar.gz: b3f45367f808443c589c7061474a1b39b8f69d0fb951f5d3e1cdda057098aaee
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c9ecdef4e9d3efe16eea3dfa32e06b4d55cf3573ddc94ed65cddedb8b5f92708f82965b34f42c189f14772f12db3c91fab5192107a07b41d1ff1c58576d963f2
|
|
7
|
+
data.tar.gz: a04aa92421f36c6173fdfeeb775372c01b2a8d7e677ed0d4e17c926be50362c853f61a62a0bce552c6b4a5c29b90df74397555fe11d66327660e16b98dca9611
|
data/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The Seedance Ruby SDK is the language-specific package for Seedance 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 README is the Ruby package guide inside the public `seedance-sdk` repository. For the repository overview, start at `../README.md`; for model details, use https://runapi.ai/models/seedance; for API reference, use https://runapi.ai/docs
|
|
5
|
+
This README is the Ruby package guide inside the public `seedance-sdk` repository. For the repository overview, start at `../README.md`; for model details, use https://runapi.ai/models/seedance; for API reference, use https://runapi.ai/docs/api/seedance/text-to-video; for SDK docs, use https://runapi.ai/docs/resources/sdks.
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
@@ -17,7 +17,7 @@ require "runapi/seedance"
|
|
|
17
17
|
|
|
18
18
|
client = RunApi::Seedance::Client.new
|
|
19
19
|
task = client.text_to_video.create(
|
|
20
|
-
# Pass the Seedance JSON request body from https://runapi.ai/docs
|
|
20
|
+
# Pass the Seedance JSON request body from https://runapi.ai/docs/api/seedance/text-to-video.
|
|
21
21
|
)
|
|
22
22
|
status = client.text_to_video.get(task.id)
|
|
23
23
|
```
|
|
@@ -33,9 +33,9 @@ Use Ruby keyword arguments and the `RunApi::Seedance` error classes when buildin
|
|
|
33
33
|
## Links
|
|
34
34
|
|
|
35
35
|
- Model page: https://runapi.ai/models/seedance
|
|
36
|
-
- SDK docs: https://runapi.ai/docs
|
|
37
|
-
- Product docs: https://runapi.ai/docs
|
|
38
|
-
- Pricing and rate limits: https://runapi.ai/models/seedance/v1-
|
|
36
|
+
- SDK docs: https://runapi.ai/docs/resources/sdks
|
|
37
|
+
- Product docs: https://runapi.ai/docs/api/seedance/text-to-video
|
|
38
|
+
- Pricing and rate limits: https://runapi.ai/models/seedance/v1-pro
|
|
39
39
|
- Provider comparison: https://runapi.ai/providers/bytedance
|
|
40
40
|
- Full catalog: https://runapi.ai/models
|
|
41
41
|
- Repository: https://github.com/runapi-ai/seedance-sdk
|
|
@@ -4,7 +4,7 @@ module RunApi
|
|
|
4
4
|
module Seedance
|
|
5
5
|
CONTRACT = {
|
|
6
6
|
"text-to-video" => {
|
|
7
|
-
"models" => ["seedance-1.5-pro", "seedance-2-mini", "seedance-2.0", "seedance-2.0-fast", "seedance-v1-
|
|
7
|
+
"models" => ["seedance-1.5-pro", "seedance-2-mini", "seedance-2.0", "seedance-2.0-fast", "seedance-v1-pro", "seedance-v1-pro-fast"],
|
|
8
8
|
"fields_by_model" => {
|
|
9
9
|
"seedance-1.5-pro" => {
|
|
10
10
|
"aspect_ratio" => {
|
|
@@ -94,22 +94,6 @@ module RunApi
|
|
|
94
94
|
"max_items" => 3
|
|
95
95
|
}
|
|
96
96
|
},
|
|
97
|
-
"seedance-v1-lite" => {
|
|
98
|
-
"aspect_ratio" => {
|
|
99
|
-
"enum" => ["1:1", "4:3", "3:4", "16:9", "9:16", "9:21"]
|
|
100
|
-
},
|
|
101
|
-
"duration_seconds" => {
|
|
102
|
-
"enum" => [5, 10],
|
|
103
|
-
"required" => true,
|
|
104
|
-
"type" => "integer"
|
|
105
|
-
},
|
|
106
|
-
"output_resolution" => {
|
|
107
|
-
"enum" => ["480p", "720p", "1080p"]
|
|
108
|
-
},
|
|
109
|
-
"seed" => {
|
|
110
|
-
"type" => "integer"
|
|
111
|
-
}
|
|
112
|
-
},
|
|
113
97
|
"seedance-v1-pro" => {
|
|
114
98
|
"aspect_ratio" => {
|
|
115
99
|
"enum" => ["1:1", "4:3", "3:4", "16:9", "9:16", "21:9"]
|
|
@@ -165,11 +149,6 @@ module RunApi
|
|
|
165
149
|
"model" => "seedance-2.0-fast"
|
|
166
150
|
},
|
|
167
151
|
"forbidden" => ["source_image_urls", "lock_camera", "seed"]
|
|
168
|
-
}, {
|
|
169
|
-
"when" => {
|
|
170
|
-
"model" => "seedance-v1-lite"
|
|
171
|
-
},
|
|
172
|
-
"forbidden" => ["source_image_urls", "reference_image_urls", "reference_video_urls", "reference_audio_urls", "web_search", "generate_audio"]
|
|
173
152
|
}, {
|
|
174
153
|
"when" => {
|
|
175
154
|
"model" => "seedance-v1-pro"
|
|
@@ -77,8 +77,8 @@ module RunApi
|
|
|
77
77
|
raise Core::ValidationError, "aspect_ratio is not accepted in image-to-video mode; it is derived from the image"
|
|
78
78
|
end
|
|
79
79
|
|
|
80
|
-
if field_present?(params, :last_frame_image_url)
|
|
81
|
-
raise Core::ValidationError, "last_frame_image_url is
|
|
80
|
+
if field_present?(params, :last_frame_image_url)
|
|
81
|
+
raise Core::ValidationError, "last_frame_image_url is not supported by #{model}"
|
|
82
82
|
end
|
|
83
83
|
|
|
84
84
|
unsupported = %i[source_image_urls reference_image_urls reference_video_urls reference_audio_urls web_search generate_audio]
|
|
@@ -8,8 +8,8 @@ module RunApi
|
|
|
8
8
|
# contract; the constants here back the bespoke checks the contract cannot
|
|
9
9
|
# express (per-model prompt length and seed range).
|
|
10
10
|
module Types
|
|
11
|
-
# V1-generation model identifiers:
|
|
12
|
-
V1_MODELS = %w[seedance-v1-
|
|
11
|
+
# V1-generation model identifiers: pro (high-quality) and pro-fast (speed-optimized).
|
|
12
|
+
V1_MODELS = %w[seedance-v1-pro seedance-v1-pro-fast].freeze
|
|
13
13
|
|
|
14
14
|
# Valid seed range; -1 requests a random seed.
|
|
15
15
|
SEED_RANGE = (-1..2_147_483_647)
|