Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
license: other
|
| 5 |
+
pipeline_tag: text-to-video
|
| 6 |
+
tags:
|
| 7 |
+
- seedance
|
| 8 |
+
- text-to-video
|
| 9 |
+
- image-to-video
|
| 10 |
+
inference: false
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# Seedance API
|
| 14 |
+
|
| 15 |
+
**Model Page:** [Seedance API](https://apiframe.ai/models/seedance-2.5)
|
| 16 |
+
|
| 17 |
+
Community model card for calling Seedance through a REST API.
|
| 18 |
+
|
| 19 |
+
This repo documents the `seedance-2.5` model as exposed by Apiframe: ByteDance Seedance 2.5, text-to-video and image-to-video, 4–30s single-pass clips, native synced audio, up to 30 reference images / 10 reference videos / 10 reference audio tracks. Related ids on the same endpoint: `seedance-2`, `seedance-2-fast`, `seedance-2-mini`.
|
| 20 |
+
|
| 21 |
+
This repository does not host weights. Seedance is a closed model. Inference runs remotely.
|
| 22 |
+
|
| 23 |
+
<video src="https://apiframe.ai/models-examples/seedance-2.5-keeper-spiral-staircase-dusk.mp4" width="280" muted controls></video>
|
| 24 |
+
|
| 25 |
+
## Model description
|
| 26 |
+
|
| 27 |
+
| | |
|
| 28 |
+
|---|---|
|
| 29 |
+
| Architecture | Seedance 2.5 |
|
| 30 |
+
| Task | text-to-video; image-to-video |
|
| 31 |
+
| Output | 1 video (`videoUrl`) |
|
| 32 |
+
| Duration | 4–30 seconds |
|
| 33 |
+
| Aspect ratios | `21:9`, `16:9`, `4:3`, `1:1`, `3:4`, `9:16` |
|
| 34 |
+
| Resolutions | `480p`, `720p` |
|
| 35 |
+
| Typical latency | ~300s |
|
| 36 |
+
|
| 37 |
+
## How to use
|
| 38 |
+
|
| 39 |
+
```bash
|
| 40 |
+
pip install requests
|
| 41 |
+
```
|
| 42 |
+
|
| 43 |
+
```python
|
| 44 |
+
import os
|
| 45 |
+
import time
|
| 46 |
+
import requests
|
| 47 |
+
|
| 48 |
+
API = "https://api.apiframe.ai/v2"
|
| 49 |
+
headers = {
|
| 50 |
+
"X-API-Key": os.environ["APIFRAME_API_KEY"],
|
| 51 |
+
"Content-Type": "application/json",
|
| 52 |
+
}
|
| 53 |
+
|
| 54 |
+
job = requests.post(
|
| 55 |
+
f"{API}/videos/generate",
|
| 56 |
+
headers=headers,
|
| 57 |
+
json={
|
| 58 |
+
"model": "seedance-2.5",
|
| 59 |
+
"prompt": "A golden retriever puppy running through a meadow of wildflowers on a sunny day",
|
| 60 |
+
"seedanceParams": {
|
| 61 |
+
"duration": 8,
|
| 62 |
+
"resolution": "720p",
|
| 63 |
+
"aspect_ratio": "16:9",
|
| 64 |
+
"generate_audio": True,
|
| 65 |
+
},
|
| 66 |
+
},
|
| 67 |
+
).json()
|
| 68 |
+
|
| 69 |
+
while True:
|
| 70 |
+
result = requests.get(f"{API}/jobs/{job['jobId']}", headers=headers).json()
|
| 71 |
+
if result["status"] in ("COMPLETED", "FAILED"):
|
| 72 |
+
break
|
| 73 |
+
time.sleep(2)
|
| 74 |
+
|
| 75 |
+
print(result.get("result"))
|
| 76 |
+
```
|
| 77 |
+
|
| 78 |
+
`result["videoUrl"]` is the CDN URL. Pass `webhookUrl` on the generate call if you do not want to poll.
|
| 79 |
+
|
| 80 |
+
Start/end frames and reference media are mutually exclusive. Do not send `start_image` together with `reference_image_urls`, `reference_video_urls`, or `reference_audio_urls`.
|
| 81 |
+
|
| 82 |
+
### Image-to-video
|
| 83 |
+
|
| 84 |
+
```python
|
| 85 |
+
import os
|
| 86 |
+
import requests
|
| 87 |
+
|
| 88 |
+
headers = {
|
| 89 |
+
"X-API-Key": os.environ["APIFRAME_API_KEY"],
|
| 90 |
+
"Content-Type": "application/json",
|
| 91 |
+
}
|
| 92 |
+
|
| 93 |
+
requests.post(
|
| 94 |
+
"https://api.apiframe.ai/v2/videos/generate",
|
| 95 |
+
headers=headers,
|
| 96 |
+
json={
|
| 97 |
+
"model": "seedance-2.5",
|
| 98 |
+
"prompt": "slow dolly in, lantern light on wet stone, rain outside",
|
| 99 |
+
"seedanceParams": {
|
| 100 |
+
"start_image": "https://example.com/frame.jpg",
|
| 101 |
+
"duration": 8,
|
| 102 |
+
"resolution": "720p",
|
| 103 |
+
"aspect_ratio": "16:9",
|
| 104 |
+
},
|
| 105 |
+
},
|
| 106 |
+
)
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
Swap `model` for `seedance-2` (up to 4K, 15s), `seedance-2-fast`, or `seedance-2-mini`.
|
| 110 |
+
|
| 111 |
+
## Limitations
|
| 112 |
+
|
| 113 |
+
- Closed model. No weights, fine-tuning, or local inference.
|
| 114 |
+
- Requires an Apiframe API key (`X-API-Key`).
|
| 115 |
+
- Commercial use follows ByteDance's terms.
|
| 116 |
+
- Generated media is retained on the CDN for 90 days.
|
| 117 |
+
|
| 118 |
+
## License
|
| 119 |
+
|
| 120 |
+
Outputs are subject to ByteDance's terms. This card is documentation only.
|