Python client for the Velvi Seedance 2 video generation API.
Project description
velvi-python
velvi is a thin Python SDK for the Velvi Seedance 2 partner API.
It wraps the partner-facing endpoints under /api/v1/video/seedance2 so external users do not need to manage raw curl requests for task creation, polling, and asset uploads.
Install
pip install velvi
Quickstart
from velvi import Velvi
client = Velvi(
api_key="velvi_partner_key_here",
base_url="https://api.velvi.tech",
)
task = client.create(
model="seedance2-fast",
prompt="A cinematic close-up of a silver sports car driving through rain at night.",
duration=5,
ratio="16:9",
)
result = client.wait(task.id, poll_interval=5.0)
print(result.status)
print(result.content.video_url if result.content else None)
Resource API
from velvi import Velvi, first_frame, reference_image
client = Velvi(api_key="velvi_partner_key_here")
asset = client.assets.upload("frame.png")
task = client.videos.create(
model="seedance2",
content=[
{"type": "text", "text": "The subject smiles softly and turns toward camera."},
first_frame(asset.asset_ref),
reference_image("https://example.com/style-reference.png"),
],
return_last_frame=True,
)
result = client.videos.wait(task.id)
print(result.content.video_url)
print(result.content.last_frame_url)
Environment Variables
VELVI_API_KEY: default API key ifapi_keyis omitted.VELVI_BASE_URL: default API hostname ifbase_urlis omitted. The SDK appends/api/v1automatically when needed.
Supported Operations
client.create(...)client.get(task_id)client.list(...)client.wait(task_id, ...)client.cancel(task_id)client.assets.upload(...)client.assets.get(...)client.assets.list(...)client.assets.delete(...)
Packaging
Build locally with:
cd sdk/python
python -m build
Then publish with your normal PyPI release flow once the package name and credentials are set up.
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 velvi-0.1.0.tar.gz.
File metadata
- Download URL: velvi-0.1.0.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1b24225656c396a7b82d09ccf4ce05ca34d847fe6663fa829d9db32b6d48a9f
|
|
| MD5 |
a4c2722a9150c4c5180f7fca58798454
|
|
| BLAKE2b-256 |
fd901e9b851f952f422e5e154266a4d25333b3e67ebb1bf008f60ed713187656
|
Provenance
The following attestation bundles were made for velvi-0.1.0.tar.gz:
Publisher:
publish-python-sdk.yml on HanzlaJavaid/AI_Talent_Network
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
velvi-0.1.0.tar.gz -
Subject digest:
f1b24225656c396a7b82d09ccf4ce05ca34d847fe6663fa829d9db32b6d48a9f - Sigstore transparency entry: 1244257196
- Sigstore integration time:
-
Permalink:
HanzlaJavaid/AI_Talent_Network@9c1d5d6de42d60e2e01ea48f0bd58090cdfaba88 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/HanzlaJavaid
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python-sdk.yml@9c1d5d6de42d60e2e01ea48f0bd58090cdfaba88 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file velvi-0.1.0-py3-none-any.whl.
File metadata
- Download URL: velvi-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
224904b157d2b20b45f0770f3df7596bb6d0295b934fe8f7554862134e3adc4a
|
|
| MD5 |
fd49806bd98a90423a31e466b7fa737a
|
|
| BLAKE2b-256 |
3ec352e7f0c20574bd12ccdf1668a1a53c62f27a682b03b4a1e19592cf6e7732
|
Provenance
The following attestation bundles were made for velvi-0.1.0-py3-none-any.whl:
Publisher:
publish-python-sdk.yml on HanzlaJavaid/AI_Talent_Network
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
velvi-0.1.0-py3-none-any.whl -
Subject digest:
224904b157d2b20b45f0770f3df7596bb6d0295b934fe8f7554862134e3adc4a - Sigstore transparency entry: 1244257210
- Sigstore integration time:
-
Permalink:
HanzlaJavaid/AI_Talent_Network@9c1d5d6de42d60e2e01ea48f0bd58090cdfaba88 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/HanzlaJavaid
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python-sdk.yml@9c1d5d6de42d60e2e01ea48f0bd58090cdfaba88 -
Trigger Event:
workflow_dispatch
-
Statement type: