runapi-seedance 0.2.0__tar.gz → 0.2.2__tar.gz
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.
- {runapi_seedance-0.2.0 → runapi_seedance-0.2.2}/PKG-INFO +8 -8
- {runapi_seedance-0.2.0 → runapi_seedance-0.2.2}/README.md +4 -4
- {runapi_seedance-0.2.0 → runapi_seedance-0.2.2}/pyproject.toml +4 -4
- {runapi_seedance-0.2.0 → runapi_seedance-0.2.2}/src/runapi/seedance/contract_gen.py +33 -18
- {runapi_seedance-0.2.0 → runapi_seedance-0.2.2}/src/runapi/seedance/resources/text_to_video.py +2 -6
- {runapi_seedance-0.2.0 → runapi_seedance-0.2.2}/src/runapi/seedance/types.py +1 -1
- {runapi_seedance-0.2.0 → runapi_seedance-0.2.2}/tests/test_client.py +4 -4
- {runapi_seedance-0.2.0 → runapi_seedance-0.2.2}/src/runapi/seedance/__init__.py +0 -0
- {runapi_seedance-0.2.0 → runapi_seedance-0.2.2}/src/runapi/seedance/client.py +0 -0
- {runapi_seedance-0.2.0 → runapi_seedance-0.2.2}/src/runapi/seedance/py.typed +0 -0
- {runapi_seedance-0.2.0 → runapi_seedance-0.2.2}/src/runapi/seedance/resources/__init__.py +0 -0
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: runapi-seedance
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: RunAPI Seedance SDK for text-to-video workflows in JavaScript, Python, Ruby, Go, Java, and PHP
|
|
5
5
|
Project-URL: Homepage, https://runapi.ai/models/seedance
|
|
6
|
-
Project-URL: Documentation, https://runapi.ai/docs
|
|
6
|
+
Project-URL: Documentation, https://runapi.ai/docs/resources/sdks
|
|
7
7
|
Project-URL: Source, https://github.com/runapi-ai/seedance-sdk
|
|
8
8
|
Project-URL: Issues, https://github.com/runapi-ai/seedance-sdk/issues
|
|
9
9
|
Project-URL: Changelog, https://github.com/runapi-ai/seedance-sdk/blob/main/CHANGELOG.md
|
|
10
|
-
Project-URL: Release Notes, https://github.com/runapi-ai/seedance-sdk/releases/tag/python%2Fv0.2.
|
|
10
|
+
Project-URL: Release Notes, https://github.com/runapi-ai/seedance-sdk/releases/tag/python%2Fv0.2.2
|
|
11
11
|
Author-email: RunAPI <contact@runapi.ai>
|
|
12
12
|
License-Expression: Apache-2.0
|
|
13
13
|
Keywords: api,golang,gradle,java,maven,python,ruby,runapi,runapi-ai,sdk,seedance,seedance-api,text-to-video,typescript,video-api,video-generation
|
|
14
14
|
Requires-Python: >=3.9
|
|
15
|
-
Requires-Dist: runapi-core>=0.3.
|
|
15
|
+
Requires-Dist: runapi-core>=0.3.3
|
|
16
16
|
Description-Content-Type: text/markdown
|
|
17
17
|
|
|
18
18
|
# Seedance Python SDK for RunAPI
|
|
19
19
|
|
|
20
20
|
The Seedance Python 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 Python.
|
|
21
21
|
|
|
22
|
-
This README is the Python 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
|
|
22
|
+
This README is the Python 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.
|
|
23
23
|
|
|
24
24
|
## Install
|
|
25
25
|
|
|
@@ -64,9 +64,9 @@ Pass parameters as keyword arguments and catch the `runapi.seedance` error class
|
|
|
64
64
|
## Links
|
|
65
65
|
|
|
66
66
|
- Model page: https://runapi.ai/models/seedance
|
|
67
|
-
- SDK docs: https://runapi.ai/docs
|
|
68
|
-
- Product docs: https://runapi.ai/docs
|
|
69
|
-
- Pricing and rate limits: https://runapi.ai/models/seedance/v1-
|
|
67
|
+
- SDK docs: https://runapi.ai/docs/resources/sdks
|
|
68
|
+
- Product docs: https://runapi.ai/docs/api/seedance/text-to-video
|
|
69
|
+
- Pricing and rate limits: https://runapi.ai/models/seedance/v1-pro
|
|
70
70
|
- Provider comparison: https://runapi.ai/providers/bytedance
|
|
71
71
|
- Full catalog: https://runapi.ai/models
|
|
72
72
|
- Repository: https://github.com/runapi-ai/seedance-sdk
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The Seedance Python 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 Python.
|
|
4
4
|
|
|
5
|
-
This README is the Python 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 Python 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
|
|
|
@@ -47,9 +47,9 @@ Pass parameters as keyword arguments and catch the `runapi.seedance` error class
|
|
|
47
47
|
## Links
|
|
48
48
|
|
|
49
49
|
- Model page: https://runapi.ai/models/seedance
|
|
50
|
-
- SDK docs: https://runapi.ai/docs
|
|
51
|
-
- Product docs: https://runapi.ai/docs
|
|
52
|
-
- Pricing and rate limits: https://runapi.ai/models/seedance/v1-
|
|
50
|
+
- SDK docs: https://runapi.ai/docs/resources/sdks
|
|
51
|
+
- Product docs: https://runapi.ai/docs/api/seedance/text-to-video
|
|
52
|
+
- Pricing and rate limits: https://runapi.ai/models/seedance/v1-pro
|
|
53
53
|
- Provider comparison: https://runapi.ai/providers/bytedance
|
|
54
54
|
- Full catalog: https://runapi.ai/models
|
|
55
55
|
- Repository: https://github.com/runapi-ai/seedance-sdk
|
|
@@ -4,22 +4,22 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "runapi-seedance"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.2"
|
|
8
8
|
description = "RunAPI Seedance SDK for text-to-video workflows in JavaScript, Python, Ruby, Go, Java, and PHP"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
|
11
11
|
license = "Apache-2.0"
|
|
12
12
|
authors = [{ name = "RunAPI", email = "contact@runapi.ai" }]
|
|
13
13
|
keywords = ["runapi", "runapi-ai", "seedance", "api", "sdk", "typescript", "python", "ruby", "golang", "java", "maven", "gradle", "video-generation", "text-to-video", "video-api", "seedance-api"]
|
|
14
|
-
dependencies = ["runapi-core>=0.3.
|
|
14
|
+
dependencies = ["runapi-core>=0.3.3"]
|
|
15
15
|
|
|
16
16
|
[project.urls]
|
|
17
17
|
Homepage = "https://runapi.ai/models/seedance"
|
|
18
|
-
Documentation = "https://runapi.ai/docs
|
|
18
|
+
Documentation = "https://runapi.ai/docs/resources/sdks"
|
|
19
19
|
Source = "https://github.com/runapi-ai/seedance-sdk"
|
|
20
20
|
Issues = "https://github.com/runapi-ai/seedance-sdk/issues"
|
|
21
21
|
Changelog = "https://github.com/runapi-ai/seedance-sdk/blob/main/CHANGELOG.md"
|
|
22
|
-
"Release Notes" = "https://github.com/runapi-ai/seedance-sdk/releases/tag/python%2Fv0.2.
|
|
22
|
+
"Release Notes" = "https://github.com/runapi-ai/seedance-sdk/releases/tag/python%2Fv0.2.2"
|
|
23
23
|
|
|
24
24
|
[tool.hatch.build.targets.wheel]
|
|
25
25
|
packages = ["src/runapi"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
CONTRACT = {
|
|
2
2
|
"text-to-video": {
|
|
3
|
-
"models": ["seedance-1.5-pro", "seedance-2-mini", "seedance-2.0", "seedance-2.0-fast", "seedance-v1-
|
|
3
|
+
"models": ["seedance-1.5-pro", "seedance-2-mini", "seedance-2.0", "seedance-2.0-fast", "seedance-v1-pro", "seedance-v1-pro-fast"],
|
|
4
4
|
"fields_by_model": {
|
|
5
5
|
"seedance-1.5-pro": {
|
|
6
6
|
"aspect_ratio": {
|
|
@@ -90,22 +90,6 @@ CONTRACT = {
|
|
|
90
90
|
"max_items": 3
|
|
91
91
|
}
|
|
92
92
|
},
|
|
93
|
-
"seedance-v1-lite": {
|
|
94
|
-
"aspect_ratio": {
|
|
95
|
-
"enum": ["1:1", "4:3", "3:4", "16:9", "9:16", "9:21"]
|
|
96
|
-
},
|
|
97
|
-
"duration_seconds": {
|
|
98
|
-
"enum": [5, 10],
|
|
99
|
-
"required": True,
|
|
100
|
-
"type": "integer"
|
|
101
|
-
},
|
|
102
|
-
"output_resolution": {
|
|
103
|
-
"enum": ["480p", "720p", "1080p"]
|
|
104
|
-
},
|
|
105
|
-
"seed": {
|
|
106
|
-
"type": "integer"
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
93
|
"seedance-v1-pro": {
|
|
110
94
|
"aspect_ratio": {
|
|
111
95
|
"enum": ["1:1", "4:3", "3:4", "16:9", "9:16", "21:9"]
|
|
@@ -140,6 +124,37 @@ CONTRACT = {
|
|
|
140
124
|
"type": "integer"
|
|
141
125
|
}
|
|
142
126
|
}
|
|
143
|
-
}
|
|
127
|
+
},
|
|
128
|
+
"rules": [{
|
|
129
|
+
"when": {
|
|
130
|
+
"model": "seedance-1.5-pro"
|
|
131
|
+
},
|
|
132
|
+
"forbidden": ["first_frame_image_url", "last_frame_image_url", "reference_image_urls", "reference_video_urls", "reference_audio_urls", "web_search"]
|
|
133
|
+
}, {
|
|
134
|
+
"when": {
|
|
135
|
+
"model": "seedance-2-mini"
|
|
136
|
+
},
|
|
137
|
+
"forbidden": ["source_image_urls", "lock_camera", "seed", "enable_safety_checker"]
|
|
138
|
+
}, {
|
|
139
|
+
"when": {
|
|
140
|
+
"model": "seedance-2.0"
|
|
141
|
+
},
|
|
142
|
+
"forbidden": ["source_image_urls", "lock_camera", "seed"]
|
|
143
|
+
}, {
|
|
144
|
+
"when": {
|
|
145
|
+
"model": "seedance-2.0-fast"
|
|
146
|
+
},
|
|
147
|
+
"forbidden": ["source_image_urls", "lock_camera", "seed"]
|
|
148
|
+
}, {
|
|
149
|
+
"when": {
|
|
150
|
+
"model": "seedance-v1-pro"
|
|
151
|
+
},
|
|
152
|
+
"forbidden": ["source_image_urls", "last_frame_image_url", "reference_image_urls", "reference_video_urls", "reference_audio_urls", "web_search", "generate_audio"]
|
|
153
|
+
}, {
|
|
154
|
+
"when": {
|
|
155
|
+
"model": "seedance-v1-pro-fast"
|
|
156
|
+
},
|
|
157
|
+
"forbidden": ["aspect_ratio", "source_image_urls", "lock_camera", "last_frame_image_url", "reference_image_urls", "reference_video_urls", "reference_audio_urls", "web_search", "generate_audio"]
|
|
158
|
+
}]
|
|
144
159
|
}
|
|
145
160
|
}
|
{runapi_seedance-0.2.0 → runapi_seedance-0.2.2}/src/runapi/seedance/resources/text_to_video.py
RENAMED
|
@@ -100,12 +100,8 @@ class TextToVideo(Resource):
|
|
|
100
100
|
"aspect_ratio is not accepted in image-to-video mode; it is derived from the image"
|
|
101
101
|
)
|
|
102
102
|
|
|
103
|
-
if self._field_present(params, "last_frame_image_url")
|
|
104
|
-
|
|
105
|
-
):
|
|
106
|
-
raise ValidationError(
|
|
107
|
-
"last_frame_image_url is only supported by seedance-v1-lite in image-to-video mode"
|
|
108
|
-
)
|
|
103
|
+
if self._field_present(params, "last_frame_image_url"):
|
|
104
|
+
raise ValidationError(f"last_frame_image_url is not supported by {model}")
|
|
109
105
|
|
|
110
106
|
unsupported = [
|
|
111
107
|
"source_image_urls",
|
|
@@ -4,7 +4,7 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
from runapi.core import BaseModel, TaskResponse, optional, required
|
|
6
6
|
|
|
7
|
-
V1_MODELS = ["seedance-v1-
|
|
7
|
+
V1_MODELS = ["seedance-v1-pro", "seedance-v1-pro-fast"]
|
|
8
8
|
|
|
9
9
|
SEED_RANGE = range(-1, 2_147_483_648)
|
|
10
10
|
|
|
@@ -235,7 +235,7 @@ def test_v2_frame_and_reference_conflict():
|
|
|
235
235
|
|
|
236
236
|
def test_v2_rejects_source_image_urls():
|
|
237
237
|
client = SeedanceClient(api_key="k", http_client=FakeHttp())
|
|
238
|
-
with pytest.raises(ValidationError, match="source_image_urls is not
|
|
238
|
+
with pytest.raises(ValidationError, match="source_image_urls is not allowed when model is seedance-2.0"):
|
|
239
239
|
client.text_to_video.create(
|
|
240
240
|
model="seedance-2.0",
|
|
241
241
|
prompt="a serene lake at dawn",
|
|
@@ -293,7 +293,7 @@ def test_v1_requires_duration():
|
|
|
293
293
|
with pytest.raises(
|
|
294
294
|
ValidationError, match="duration_seconds is required"
|
|
295
295
|
):
|
|
296
|
-
client.text_to_video.create(model="seedance-v1-
|
|
296
|
+
client.text_to_video.create(model="seedance-v1-pro", prompt="a serene lake at dawn")
|
|
297
297
|
|
|
298
298
|
|
|
299
299
|
def test_v1_pro_fast_requires_first_frame():
|
|
@@ -327,7 +327,7 @@ def test_v1_image_mode_rejects_aspect_ratio():
|
|
|
327
327
|
ValidationError, match="aspect_ratio is not accepted in image-to-video mode"
|
|
328
328
|
):
|
|
329
329
|
client.text_to_video.create(
|
|
330
|
-
model="seedance-v1-
|
|
330
|
+
model="seedance-v1-pro",
|
|
331
331
|
prompt="a serene lake at dawn",
|
|
332
332
|
duration_seconds=5,
|
|
333
333
|
first_frame_image_url="https://x/a.png",
|
|
@@ -341,7 +341,7 @@ def test_v1_seed_range():
|
|
|
341
341
|
ValidationError, match="seed must be an integer between -1 and 2147483647"
|
|
342
342
|
):
|
|
343
343
|
client.text_to_video.create(
|
|
344
|
-
model="seedance-v1-
|
|
344
|
+
model="seedance-v1-pro",
|
|
345
345
|
prompt="a serene lake at dawn",
|
|
346
346
|
duration_seconds=5,
|
|
347
347
|
seed=-5,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|