Metadata-Version: 2.4
Name: velvi
Version: 0.1.0
Summary: Python client for the Velvi Seedance 2 video generation API.
Author: Velvi
License-Expression: LicenseRef-Proprietary
Project-URL: Homepage, https://velvi.tech
Project-URL: Documentation, https://api.velvi.tech/docs
Project-URL: Repository, https://github.com/HanzlaJavaid/AI_Talent_Network
Project-URL: Issues, https://github.com/HanzlaJavaid/AI_Talent_Network/issues
Keywords: velvi,seedance2,video-generation,sdk
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: OS Independent
Classifier: Topic :: Multimedia :: Video
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: httpx<1.0,>=0.27

# 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

```bash
pip install velvi
```

## Quickstart

```python
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

```python
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 if `api_key` is omitted.
- `VELVI_BASE_URL`: default API hostname if `base_url` is omitted. The SDK appends `/api/v1` automatically 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:

```bash
cd sdk/python
python -m build
```

Then publish with your normal PyPI release flow once the package name and credentials are set up.
