seedance-client 1.0.0__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.
@@ -0,0 +1,97 @@
1
+ Metadata-Version: 2.1
2
+ Name: seedance-client
3
+ Version: 1.0.0
4
+ Summary: Official Python SDK for Seedance 2.5 native 30s AI video generator with multimodal references and synced audio.
5
+ Home-page: https://seedance25.tech
6
+ Author: Seedance 2.5
7
+ Author-email: support@seedance25.tech
8
+ License: UNKNOWN
9
+ Project-URL: Homepage, https://seedance25.tech
10
+ Project-URL: Interactive Studio, https://seedance25.tech/#generator
11
+ Project-URL: Prompt Library, https://seedance25.tech/prompts
12
+ Project-URL: Repository, https://github.com/lidong-tools/website-seedance25-tech
13
+ Project-URL: Bug Tracker, https://github.com/lidong-tools/website-seedance25-tech/issues
14
+ Description: # Seedance 2.5 Python SDK
15
+
16
+ [![PyPI version](https://img.shields.io/pypi/v/seedance-client.svg)](https://pypi.org/project/seedance-client/)
17
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
18
+ [![Python Versions](https://img.shields.io/pypi/pyversions/seedance-client.svg)](https://pypi.org/project/seedance-client/)
19
+ [![Official Website](https://img.shields.io/badge/Official%20Studio-seedance25.tech-blue)](https://seedance25.tech)
20
+
21
+ Official Python SDK for **[Seedance 2.5](https://seedance25.tech)** — the native 30s AI video generation model with 50+ multimodal references and synchronized audio rendering.
22
+
23
+ > 🎬 **Online Studio & Generator**: Experience the web generator directly at **[https://seedance25.tech](https://seedance25.tech)**.
24
+
25
+ ---
26
+
27
+ ## ✨ Features
28
+
29
+ - **Native 30s Video Generation**: Extended clip generation with consistent physics and motion.
30
+ - **Multimodal Video Prompts**: Seamlessly blend text, image references, and audio inputs.
31
+ - **Synchronized Audio Engine**: High-fidelity sound effects and ambient audio generation.
32
+ - **Zero Third-Party Dependencies**: Pure Python standard library implementation for maximum portability.
33
+ - **Complete Type Hinting**: Comprehensive IDE autocomplete support.
34
+
35
+ ---
36
+
37
+ ## 📦 Installation
38
+
39
+ ```bash
40
+ pip install seedance-client
41
+ ```
42
+
43
+ ---
44
+
45
+ ## 🚀 Quick Start
46
+
47
+ ### 1. Generate Video with Synced Audio
48
+
49
+ ```python
50
+ from seedance_client import SeedanceClient
51
+
52
+ client = SeedanceClient()
53
+
54
+ task = client.generate_video(
55
+ prompt="Cinematic drone sweep over Nordic fjords during sunset, crystal clear reflections and ambient wind sound",
56
+ aspect_ratio="16:9",
57
+ resolution="1080p",
58
+ duration=10,
59
+ enable_audio=True,
60
+ )
61
+
62
+ print(f"Task submitted! ID: {task.get('taskId')}")
63
+ ```
64
+
65
+ ### 2. Check Task Progress
66
+
67
+ ```python
68
+ task_status = client.get_task(task_id="YOUR_TASK_ID")
69
+ print("Status:", task_status.get("status"))
70
+ if task_status.get("videoUrl"):
71
+ print("Download URL:", task_status.get("videoUrl"))
72
+ ```
73
+
74
+ ---
75
+
76
+ ## 🔗 Official Links & Resources
77
+
78
+ - **Official Web Platform**: [https://seedance25.tech](https://seedance25.tech)
79
+ - **Interactive Generator**: [https://seedance25.tech/#generator](https://seedance25.tech/#generator)
80
+ - **Prompt Library**: [https://seedance25.tech/prompts](https://seedance25.tech/prompts)
81
+ - **Repository**: [https://github.com/lidong-tools/website-seedance25-tech](https://github.com/lidong-tools/website-seedance25-tech)
82
+
83
+ ---
84
+
85
+ ## 📄 License
86
+
87
+ MIT © [Seedance 2.5](https://seedance25.tech)
88
+
89
+ Platform: UNKNOWN
90
+ Classifier: Development Status :: 4 - Beta
91
+ Classifier: Intended Audience :: Developers
92
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
93
+ Classifier: Topic :: Multimedia :: Video
94
+ Classifier: License :: OSI Approved :: MIT License
95
+ Classifier: Programming Language :: Python :: 3
96
+ Requires-Python: >=3.8
97
+ Description-Content-Type: text/markdown
@@ -0,0 +1,74 @@
1
+ # Seedance 2.5 Python SDK
2
+
3
+ [![PyPI version](https://img.shields.io/pypi/v/seedance-client.svg)](https://pypi.org/project/seedance-client/)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
+ [![Python Versions](https://img.shields.io/pypi/pyversions/seedance-client.svg)](https://pypi.org/project/seedance-client/)
6
+ [![Official Website](https://img.shields.io/badge/Official%20Studio-seedance25.tech-blue)](https://seedance25.tech)
7
+
8
+ Official Python SDK for **[Seedance 2.5](https://seedance25.tech)** — the native 30s AI video generation model with 50+ multimodal references and synchronized audio rendering.
9
+
10
+ > 🎬 **Online Studio & Generator**: Experience the web generator directly at **[https://seedance25.tech](https://seedance25.tech)**.
11
+
12
+ ---
13
+
14
+ ## ✨ Features
15
+
16
+ - **Native 30s Video Generation**: Extended clip generation with consistent physics and motion.
17
+ - **Multimodal Video Prompts**: Seamlessly blend text, image references, and audio inputs.
18
+ - **Synchronized Audio Engine**: High-fidelity sound effects and ambient audio generation.
19
+ - **Zero Third-Party Dependencies**: Pure Python standard library implementation for maximum portability.
20
+ - **Complete Type Hinting**: Comprehensive IDE autocomplete support.
21
+
22
+ ---
23
+
24
+ ## 📦 Installation
25
+
26
+ ```bash
27
+ pip install seedance-client
28
+ ```
29
+
30
+ ---
31
+
32
+ ## 🚀 Quick Start
33
+
34
+ ### 1. Generate Video with Synced Audio
35
+
36
+ ```python
37
+ from seedance_client import SeedanceClient
38
+
39
+ client = SeedanceClient()
40
+
41
+ task = client.generate_video(
42
+ prompt="Cinematic drone sweep over Nordic fjords during sunset, crystal clear reflections and ambient wind sound",
43
+ aspect_ratio="16:9",
44
+ resolution="1080p",
45
+ duration=10,
46
+ enable_audio=True,
47
+ )
48
+
49
+ print(f"Task submitted! ID: {task.get('taskId')}")
50
+ ```
51
+
52
+ ### 2. Check Task Progress
53
+
54
+ ```python
55
+ task_status = client.get_task(task_id="YOUR_TASK_ID")
56
+ print("Status:", task_status.get("status"))
57
+ if task_status.get("videoUrl"):
58
+ print("Download URL:", task_status.get("videoUrl"))
59
+ ```
60
+
61
+ ---
62
+
63
+ ## 🔗 Official Links & Resources
64
+
65
+ - **Official Web Platform**: [https://seedance25.tech](https://seedance25.tech)
66
+ - **Interactive Generator**: [https://seedance25.tech/#generator](https://seedance25.tech/#generator)
67
+ - **Prompt Library**: [https://seedance25.tech/prompts](https://seedance25.tech/prompts)
68
+ - **Repository**: [https://github.com/lidong-tools/website-seedance25-tech](https://github.com/lidong-tools/website-seedance25-tech)
69
+
70
+ ---
71
+
72
+ ## 📄 License
73
+
74
+ MIT © [Seedance 2.5](https://seedance25.tech)
@@ -0,0 +1,43 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "seedance-client"
7
+ version = "1.0.0"
8
+ description = "Official Python SDK for Seedance 2.5 native 30s AI video generator with multimodal references and synced audio."
9
+ readme = "README.md"
10
+ requires-python = ">=3.8"
11
+ license = { text = "MIT" }
12
+ authors = [
13
+ { name = "Seedance 2.5", email = "support@seedance25.tech" },
14
+ ]
15
+ keywords = [
16
+ "seedance",
17
+ "seedance-client",
18
+ "seedance 2.5",
19
+ "ai video generator",
20
+ "text to video",
21
+ "image to video",
22
+ "synced audio",
23
+ ]
24
+ classifiers = [
25
+ "Development Status :: 4 - Beta",
26
+ "Intended Audience :: Developers",
27
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
28
+ "Topic :: Multimedia :: Video",
29
+ "License :: OSI Approved :: MIT License",
30
+ "Programming Language :: Python :: 3",
31
+ "Programming Language :: Python :: 3.8",
32
+ "Programming Language :: Python :: 3.9",
33
+ "Programming Language :: Python :: 3.10",
34
+ "Programming Language :: Python :: 3.11",
35
+ "Programming Language :: Python :: 3.12",
36
+ ]
37
+
38
+ [project.urls]
39
+ Homepage = "https://seedance25.tech"
40
+ "Interactive Studio" = "https://seedance25.tech/#generator"
41
+ "Prompt Library" = "https://seedance25.tech/prompts"
42
+ Repository = "https://github.com/lidong-tools/website-seedance25-tech"
43
+ "Bug Tracker" = "https://github.com/lidong-tools/website-seedance25-tech/issues"
@@ -0,0 +1,9 @@
1
+ """
2
+ Seedance 2.5 官方 Python 客户端 SDK
3
+ 官方工作台: https://seedance25.tech
4
+ """
5
+
6
+ from .client import SeedanceClient
7
+
8
+ __version__ = "1.0.0"
9
+ __all__ = ["SeedanceClient"]
@@ -0,0 +1,114 @@
1
+ """
2
+ Seedance 2.5 API Python 客户端实现
3
+ 用于提交多模态文本生视频、图生视频及音频同步生成任务
4
+ """
5
+
6
+ import json
7
+ import os
8
+ import urllib.error
9
+ import urllib.request
10
+ from typing import Any, Dict, Optional
11
+
12
+
13
+ class SeedanceClient:
14
+ """Seedance 2.5 官方客户端类"""
15
+
16
+ def __init__(
17
+ self,
18
+ api_key: Optional[str] = None,
19
+ base_url: str = "https://seedance25.tech/api",
20
+ ) -> None:
21
+ """初始化 Seedance 2.5 客户端
22
+
23
+ :param api_key: Seedance API 密钥,默认读取环境变量 SEEDANCE_API_KEY
24
+ :param base_url: API 基础地址
25
+ """
26
+ self.api_key = api_key or os.environ.get("SEEDANCE_API_KEY", "")
27
+ self.base_url = base_url.rstrip("/")
28
+
29
+ def generate_video(
30
+ self,
31
+ prompt: str,
32
+ model: str = "seedance-2.5",
33
+ aspect_ratio: str = "16:9",
34
+ resolution: str = "1080p",
35
+ duration: int = 10,
36
+ reference_image_url: Optional[str] = None,
37
+ enable_audio: bool = True,
38
+ ) -> Dict[str, Any]:
39
+ """提交视频生成任务
40
+
41
+ :param prompt: 视频场景或动作描述提示词
42
+ :param model: 模型版本,默认 "seedance-2.5"
43
+ :param aspect_ratio: 画面比例 ("16:9", "9:16", "1:1")
44
+ :param resolution: 导出分辨率 ("720p", "1080p", "4k")
45
+ :param duration: 生成时长(秒,最高支持 30 秒)
46
+ :param reference_image_url: 保持主体一致性的参考图地址
47
+ :param enable_audio: 是否开启同步音频生成
48
+ :return: 包含任务 ID 与状态的字典
49
+ """
50
+ if not prompt or not prompt.strip():
51
+ raise ValueError("[Seedance 2.5] 错误: prompt 提示词不能为空。")
52
+
53
+ payload = {
54
+ "model": model,
55
+ "prompt": prompt.strip(),
56
+ "aspectRatio": aspect_ratio,
57
+ "resolution": resolution,
58
+ "duration": duration,
59
+ "referenceImageUrl": reference_image_url,
60
+ "enableAudio": enable_audio,
61
+ }
62
+
63
+ data = json.dumps(payload).encode("utf-8")
64
+ headers = {
65
+ "Content-Type": "application/json",
66
+ "User-Agent": "seedance-client-python/1.0.0",
67
+ }
68
+ if self.api_key:
69
+ headers["Authorization"] = f"Bearer {self.api_key}"
70
+
71
+ req = urllib.request.Request(
72
+ f"{self.base_url}/ai/generate",
73
+ data=data,
74
+ headers=headers,
75
+ method="POST",
76
+ )
77
+
78
+ try:
79
+ with urllib.request.urlopen(req, timeout=60) as resp:
80
+ response_text = resp.read().decode("utf-8")
81
+ return json.loads(response_text)
82
+ except urllib.error.HTTPError as e:
83
+ error_body = e.read().decode("utf-8", errors="ignore")
84
+ raise RuntimeError(f"[Seedance 2.5] 视频生成失败 (HTTP {e.code}): {error_body}") from e
85
+ except Exception as e:
86
+ raise RuntimeError(f"[Seedance 2.5] 网络请求异常: {str(e)}") from e
87
+
88
+ def get_task(self, task_id: str) -> Dict[str, Any]:
89
+ """查询指定视频生成任务的状态与结果
90
+
91
+ :param task_id: 任务唯一标识 ID
92
+ :return: 任务详情与视频结果直链
93
+ """
94
+ if not task_id:
95
+ raise ValueError("[Seedance 2.5] 错误: task_id 不能为空。")
96
+
97
+ headers = {
98
+ "User-Agent": "seedance-client-python/1.0.0",
99
+ }
100
+ if self.api_key:
101
+ headers["Authorization"] = f"Bearer {self.api_key}"
102
+
103
+ req = urllib.request.Request(
104
+ f"{self.base_url}/ai/tasks/{task_id}",
105
+ headers=headers,
106
+ method="GET",
107
+ )
108
+
109
+ try:
110
+ with urllib.request.urlopen(req, timeout=30) as resp:
111
+ response_text = resp.read().decode("utf-8")
112
+ return json.loads(response_text)
113
+ except Exception as e:
114
+ raise RuntimeError(f"[Seedance 2.5] 获取任务进度失败: {str(e)}") from e
@@ -0,0 +1,97 @@
1
+ Metadata-Version: 2.1
2
+ Name: seedance-client
3
+ Version: 1.0.0
4
+ Summary: Official Python SDK for Seedance 2.5 native 30s AI video generator with multimodal references and synced audio.
5
+ Home-page: https://seedance25.tech
6
+ Author: Seedance 2.5
7
+ Author-email: support@seedance25.tech
8
+ License: UNKNOWN
9
+ Project-URL: Homepage, https://seedance25.tech
10
+ Project-URL: Interactive Studio, https://seedance25.tech/#generator
11
+ Project-URL: Prompt Library, https://seedance25.tech/prompts
12
+ Project-URL: Repository, https://github.com/lidong-tools/website-seedance25-tech
13
+ Project-URL: Bug Tracker, https://github.com/lidong-tools/website-seedance25-tech/issues
14
+ Description: # Seedance 2.5 Python SDK
15
+
16
+ [![PyPI version](https://img.shields.io/pypi/v/seedance-client.svg)](https://pypi.org/project/seedance-client/)
17
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
18
+ [![Python Versions](https://img.shields.io/pypi/pyversions/seedance-client.svg)](https://pypi.org/project/seedance-client/)
19
+ [![Official Website](https://img.shields.io/badge/Official%20Studio-seedance25.tech-blue)](https://seedance25.tech)
20
+
21
+ Official Python SDK for **[Seedance 2.5](https://seedance25.tech)** — the native 30s AI video generation model with 50+ multimodal references and synchronized audio rendering.
22
+
23
+ > 🎬 **Online Studio & Generator**: Experience the web generator directly at **[https://seedance25.tech](https://seedance25.tech)**.
24
+
25
+ ---
26
+
27
+ ## ✨ Features
28
+
29
+ - **Native 30s Video Generation**: Extended clip generation with consistent physics and motion.
30
+ - **Multimodal Video Prompts**: Seamlessly blend text, image references, and audio inputs.
31
+ - **Synchronized Audio Engine**: High-fidelity sound effects and ambient audio generation.
32
+ - **Zero Third-Party Dependencies**: Pure Python standard library implementation for maximum portability.
33
+ - **Complete Type Hinting**: Comprehensive IDE autocomplete support.
34
+
35
+ ---
36
+
37
+ ## 📦 Installation
38
+
39
+ ```bash
40
+ pip install seedance-client
41
+ ```
42
+
43
+ ---
44
+
45
+ ## 🚀 Quick Start
46
+
47
+ ### 1. Generate Video with Synced Audio
48
+
49
+ ```python
50
+ from seedance_client import SeedanceClient
51
+
52
+ client = SeedanceClient()
53
+
54
+ task = client.generate_video(
55
+ prompt="Cinematic drone sweep over Nordic fjords during sunset, crystal clear reflections and ambient wind sound",
56
+ aspect_ratio="16:9",
57
+ resolution="1080p",
58
+ duration=10,
59
+ enable_audio=True,
60
+ )
61
+
62
+ print(f"Task submitted! ID: {task.get('taskId')}")
63
+ ```
64
+
65
+ ### 2. Check Task Progress
66
+
67
+ ```python
68
+ task_status = client.get_task(task_id="YOUR_TASK_ID")
69
+ print("Status:", task_status.get("status"))
70
+ if task_status.get("videoUrl"):
71
+ print("Download URL:", task_status.get("videoUrl"))
72
+ ```
73
+
74
+ ---
75
+
76
+ ## 🔗 Official Links & Resources
77
+
78
+ - **Official Web Platform**: [https://seedance25.tech](https://seedance25.tech)
79
+ - **Interactive Generator**: [https://seedance25.tech/#generator](https://seedance25.tech/#generator)
80
+ - **Prompt Library**: [https://seedance25.tech/prompts](https://seedance25.tech/prompts)
81
+ - **Repository**: [https://github.com/lidong-tools/website-seedance25-tech](https://github.com/lidong-tools/website-seedance25-tech)
82
+
83
+ ---
84
+
85
+ ## 📄 License
86
+
87
+ MIT © [Seedance 2.5](https://seedance25.tech)
88
+
89
+ Platform: UNKNOWN
90
+ Classifier: Development Status :: 4 - Beta
91
+ Classifier: Intended Audience :: Developers
92
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
93
+ Classifier: Topic :: Multimedia :: Video
94
+ Classifier: License :: OSI Approved :: MIT License
95
+ Classifier: Programming Language :: Python :: 3
96
+ Requires-Python: >=3.8
97
+ Description-Content-Type: text/markdown
@@ -0,0 +1,9 @@
1
+ README.md
2
+ pyproject.toml
3
+ setup.py
4
+ seedance_client/__init__.py
5
+ seedance_client/client.py
6
+ seedance_client.egg-info/PKG-INFO
7
+ seedance_client.egg-info/SOURCES.txt
8
+ seedance_client.egg-info/dependency_links.txt
9
+ seedance_client.egg-info/top_level.txt
@@ -0,0 +1 @@
1
+ seedance_client
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,32 @@
1
+ from setuptools import setup, find_packages
2
+
3
+ with open("README.md", "r", encoding="utf-8") as fh:
4
+ long_description = fh.read()
5
+
6
+ setup(
7
+ name="seedance-client",
8
+ version="1.0.0",
9
+ author="Seedance 2.5",
10
+ author_email="support@seedance25.tech",
11
+ description="Official Python SDK for Seedance 2.5 native 30s AI video generator with multimodal references and synced audio.",
12
+ long_description=long_description,
13
+ long_description_content_type="text/markdown",
14
+ url="https://seedance25.tech",
15
+ project_urls={
16
+ "Homepage": "https://seedance25.tech",
17
+ "Interactive Studio": "https://seedance25.tech/#generator",
18
+ "Prompt Library": "https://seedance25.tech/prompts",
19
+ "Repository": "https://github.com/lidong-tools/website-seedance25-tech",
20
+ "Bug Tracker": "https://github.com/lidong-tools/website-seedance25-tech/issues",
21
+ },
22
+ packages=find_packages(),
23
+ classifiers=[
24
+ "Development Status :: 4 - Beta",
25
+ "Intended Audience :: Developers",
26
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
27
+ "Topic :: Multimedia :: Video",
28
+ "License :: OSI Approved :: MIT License",
29
+ "Programming Language :: Python :: 3",
30
+ ],
31
+ python_requires=">=3.8",
32
+ )