Seedance-API / README.md
AI-APIs's picture
Create README.md
0749636 verified
|
Raw
History Blame Contribute Delete
3.27 kB
---
language:
- en
license: other
pipeline_tag: text-to-video
tags:
- seedance
- text-to-video
- image-to-video
inference: false
---
# Seedance API
**Model Page:** [Seedance API](https://apiframe.ai/models/seedance-2.5)
Community model card for calling Seedance through a REST API.
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`.
This repository does not host weights. Seedance is a closed model. Inference runs remotely.
<video src="https://apiframe.ai/models-examples/seedance-2.5-keeper-spiral-staircase-dusk.mp4" width="280" muted controls></video>
## Model description
| | |
|---|---|
| Architecture | Seedance 2.5 |
| Task | text-to-video; image-to-video |
| Output | 1 video (`videoUrl`) |
| Duration | 4–30 seconds |
| Aspect ratios | `21:9`, `16:9`, `4:3`, `1:1`, `3:4`, `9:16` |
| Resolutions | `480p`, `720p` |
| Typical latency | ~300s |
## How to use
```bash
pip install requests
```
```python
import os
import time
import requests
API = "https://api.apiframe.ai/v2"
headers = {
"X-API-Key": os.environ["APIFRAME_API_KEY"],
"Content-Type": "application/json",
}
job = requests.post(
f"{API}/videos/generate",
headers=headers,
json={
"model": "seedance-2.5",
"prompt": "A golden retriever puppy running through a meadow of wildflowers on a sunny day",
"seedanceParams": {
"duration": 8,
"resolution": "720p",
"aspect_ratio": "16:9",
"generate_audio": True,
},
},
).json()
while True:
result = requests.get(f"{API}/jobs/{job['jobId']}", headers=headers).json()
if result["status"] in ("COMPLETED", "FAILED"):
break
time.sleep(2)
print(result.get("result"))
```
`result["videoUrl"]` is the CDN URL. Pass `webhookUrl` on the generate call if you do not want to poll.
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`.
### Image-to-video
```python
import os
import requests
headers = {
"X-API-Key": os.environ["APIFRAME_API_KEY"],
"Content-Type": "application/json",
}
requests.post(
"https://api.apiframe.ai/v2/videos/generate",
headers=headers,
json={
"model": "seedance-2.5",
"prompt": "slow dolly in, lantern light on wet stone, rain outside",
"seedanceParams": {
"start_image": "https://example.com/frame.jpg",
"duration": 8,
"resolution": "720p",
"aspect_ratio": "16:9",
},
},
)
```
Swap `model` for `seedance-2` (up to 4K, 15s), `seedance-2-fast`, or `seedance-2-mini`.
## Limitations
- Closed model. No weights, fine-tuning, or local inference.
- Requires an Apiframe API key (`X-API-Key`).
- Commercial use follows ByteDance's terms.
- Generated media is retained on the CDN for 90 days.
## License
Outputs are subject to ByteDance's terms. This card is documentation only.