byteplus-py
A small convenience SDK for BytePlus ModelArk APIs, starting with Seedance video generation.
It wraps the official byteplus-python-sdk-v2 Ark runtime and adds fal-style submit,
retrieve, wait, and subscribe helpers.
Install
python -m pip install -e ".[dev]"
Configure
Create a .env file:
BYTEPLUS_API_KEY=ark-...
ARK_API_KEY is also supported.
Usage
from byteplus_py import BytePlus
from byteplus_py.seedance import image_url, text
client = BytePlus.from_env()
task = client.seedance.submit(
model="dreamina-seedance-2-0-fast-260128",
content=[
text("A cinematic shot of fruit tea being prepared."),
image_url(
"https://ark-doc.tos-ap-southeast-1.bytepluses.com/doc_image/r2v_tea_pic1.jpg",
role="reference_image",
),
],
generate_audio=True,
ratio="16:9",
duration=4,
watermark=False,
)
print(task.id)
For fal-style polling:
result = client.seedance.subscribe(
model="dreamina-seedance-2-0-fast-260128",
content=[text("A tiny robot waters a basil plant in morning light.")],
duration=4,
)
print(result.video_url)
Download a Completed Video
from byteplus_py import BytePlus
client = BytePlus.from_env()
path = client.seedance.download_video("cgt-...", output_dir="downloads")
print(path)
Estimate Video Cost
The Seedance API returns usage.completion_tokens for completed tasks. The SDK can
combine that with the video generation rates in docs/byteplus-pricing.md:
task = client.seedance.retrieve("cgt-...")
cost = client.seedance.estimate_cost(task, input_includes_video=True)
print(cost.amount_usd)
Smoke Test
The smoke script submits the multimodal sample from docs/video-api-docs.md and prints only non-secret task data:
python examples/seedance_smoke.py --no-wait
To poll until completion:
python examples/seedance_smoke.py --wait --timeout 900
To wait and download the completed video:
python examples/seedance_smoke.py --wait --download
Metadata
Release files for byteplus-py 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| byteplus_py-0.1.0.tar.gz | 33.0 kB | With provenance | Details for byteplus_py-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| byteplus_py-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for byteplus_py-0.1.0-py3-none-any.whl |
Total release size: 44.0 kB
Release files / byteplus_py-0.1.0.tar.gz
| Download URL | byteplus_py-0.1.0.tar.gz |
|---|---|
| Size | 33.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3ece2d65225719fc736961fd9f33cbd53e4e25e7103bbb3ef9296dbbbe791faf
|
|
BLAKE2b-256 checksum How to use checksums |
895ee5b7f90e6757671100cffd3c4fcada4d69f6d88894a8411db2433b5d4df6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 16, 2026.
Transparency logRelease files / byteplus_py-0.1.0-py3-none-any.whl
| Download URL | byteplus_py-0.1.0-py3-none-any.whl |
|---|---|
| Size | 11.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
989a01541a9734815ad83e863ff20181b35ce065ddb338f1667d8ce9a149b648
|
|
BLAKE2b-256 checksum How to use checksums |
665dd5cc71131187859b1783304e9493dfd59eb5508d8e0b2a89e618bc985b95
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 16, 2026.
Transparency logSecurity for byteplus-py 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for byteplus_py-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 16, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.