Python SDK for Seedance 2.5 and Seedance video generation through the HiAPI unified task API.
Project description
HiAPI Seedance Python SDK
Python SDK for Seedance 2.5 API, Seedance text-to-video, Seedance image-to-video, and Seedance video editing through the HiAPI unified task API.
Use this SDK when you want a small Python client focused on AI video generation:
- Seedance 2.5 API access through HiAPI's
/v1/tasksendpoint. - Text-to-video with
client.text_to_video(...). - Image-to-video with
client.image_to_video(...). - Video editing with
client.video_edit(...). - Async task polling built in: submit, poll, and read the output URL.
- Zero runtime dependencies: standard library only.
Install
pip install hiapi-seedance
Requires Python 3.8+.
Quick Start
from hiapi_seedance import Seedance
client = Seedance() # uses HIAPI_API_KEY
task = client.text_to_video(
prompt="A 30-second cinematic one-take product film, golden hour, slow dolly in",
duration=30,
aspect_ratio="16:9",
resolution="1080p",
)
print(task.output[0].url)
Set your API key:
export HIAPI_API_KEY="sk-your-hiapi-key"
Get a key at HiAPI.
Text-to-Video
from hiapi_seedance import Seedance
client = Seedance(api_key="sk-...")
task = client.text_to_video(
prompt=(
"A one-take AI video prompt: a glass perfume bottle rotates on wet black "
"stone while sunrise light moves across the surface, macro texture, no text."
),
duration=15,
aspect_ratio="16:9",
resolution="1080p",
)
print(task.status, task.output[0].url)
Image-to-Video
task = client.image_to_video(
prompt="Animate the reference image with a slow push-in, drifting fabric, and warm rim light.",
image_urls=["https://example.com/first-frame.png"],
duration=8,
aspect_ratio="9:16",
)
Video Editing
task = client.video_edit(
prompt="Keep the original camera movement and timing. Add a blue-white energy bow in the actor's hands.",
video_urls=["https://example.com/source.mp4"],
image_urls=["https://example.com/prop-reference.png"],
)
Return Immediately Instead of Waiting
created = client.text_to_video(
prompt="A fashion film in a desert gallery",
duration=30,
wait=False,
)
task = client.wait(created.task_id, poll_interval=3, timeout=900)
print(task.output[0].url)
Raw HiAPI Task Shape
The SDK sends requests to:
POST https://api.hiapi.ai/v1/tasks
Authorization: Bearer $HIAPI_API_KEY
Content-Type: application/json
{
"model": "seedance-2-5",
"input": {
"prompt": "A cinematic Seedance 2.5 prompt",
"duration": 30,
"aspect_ratio": "16:9",
"resolution": "1080p"
}
}
You can pass additional model fields as keyword arguments:
task = client.text_to_video(
prompt="A multilingual typography loop",
duration=15,
web_search=False,
generate_audio=True,
)
Prompt Library
Need production prompts and preview examples? Use the companion prompt library:
Model Slug
The default model is seedance-2-5. You can override it per client or per call:
client = Seedance(model="seedance-2-5")
task = client.text_to_video(prompt="...", model="seedance-2-0")
Use the fallback model while waiting for Seedance 2.5 availability on your account.
SEO Keywords
Seedance 2.5 API, Seedance Python SDK, Seedance API Python, Seedance text to video API, Seedance image to video API, AI video generation API, text-to-video Python, image-to-video Python, HiAPI Seedance API.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hiapi_seedance-0.1.0.tar.gz.
File metadata
- Download URL: hiapi_seedance-0.1.0.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
51a7c801fd93047799c09e69e626bcfd803e54a537bd580c1821528462cb66aa
|
|
| MD5 |
8f025d690c1933188bc2ab4bc1d78cd2
|
|
| BLAKE2b-256 |
281466cbbcbe28c48fb2f29b00b17d15256e057879d80cc5627dfe4ab28f95da
|
File details
Details for the file hiapi_seedance-0.1.0-py3-none-any.whl.
File metadata
- Download URL: hiapi_seedance-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f05a037129844872bee8ddffea7c58823e3fcbab29fbffd6349fe7ba852e8637
|
|
| MD5 |
1e16a1ca44dc989103534daf0f89fec8
|
|
| BLAKE2b-256 |
8d113a8f687ff7edcca153d16949a093fb91a0e51fefa56ce1d67dbc6d536f59
|