Metadata-Version: 2.4
Name: gptproto
Version: 0.1.0
Summary: Spec-driven SDK for the gptproto async media generation API
Author: gptproto
License: MIT
Project-URL: Homepage, https://gptproto.com
Project-URL: Repository, https://github.com/gptproto/gptproto-sdk
Keywords: gptproto,sdk,ai,video-generation,image-generation
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.24
Requires-Dist: attrs>=22.2
Requires-Dist: python-dateutil>=2.8
Requires-Dist: typing_extensions>=4.7

# GPTProto Python SDK

Typed Python client for the GPTProto unified asynchronous media API. The
generated transport and models are wrapped by `GptprotoClient` for unified
create/get/run polling.

## Use

```bash
pip install gptproto
export GPTPROTO_API_KEY=your_key
```

```python
from gptproto import GptprotoClient
from gptproto.models import UnifiedVideoRequest, VideoResolution

client = GptprotoClient()
result = client.run(
    "video",
    UnifiedVideoRequest(
        model="kwaivgi/kling-v2.5",
        prompt="a cat dancing",
        duration=5,
        resolution=VideoResolution.RESOLUTION_1080P,
    ),
)
print(result.unsigned_urls)
```

Task kinds are `video`, `image`, `speech`, `voice-clone`, `lip-sync`, `3d`,
and `image-tool`. `run()` returns on `completed`, raises `TaskFailedError` for
`failed`, `cancelled`, or `expired`, and raises `TaskTimeoutError` on timeout.

For local development:

```bash
python3.11 -m venv .venv
source .venv/bin/activate
pip install -e .
python examples/demo.py
```

Use the repository-level `../generate.sh` to regenerate without overwriting
the hand-written `run.py` and public `__init__.py`.
