Metadata-Version: 2.4
Name: storkai
Version: 0.1.0
Summary: Client for the Stork API: talking photo video, text to speech and singing video.
Author: Stork.AI
License: MIT
Project-URL: Homepage, https://www.stork.ai/developers
Project-URL: Documentation, https://www.stork.ai/developers
Keywords: stork,talking photo,lip sync,text to speech,tts,ai video
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# storkai (Python)

Client for the [Stork API](https://www.stork.ai/developers): talking photo video,
text to speech and singing video. No dependencies. Python 3.8+.

```bash
pip install storkai
export STORK_API_KEY=sk_stork_...   # create one at https://www.stork.ai/dashboard/api
```

```python
from storkai import Stork

stork = Stork()

# Text to speech: an MP3 from text (the free tier needs no credits)
audio = stork.speech.create_and_wait(text="Welcome back to the channel.", voice_id="en-ava", tier="free")
print(audio["audio_url"])

# Talking photo: one photo says your text
video = stork.talking_photo.create_and_wait(
    image_url="https://www.stork.ai/samples/talking-photo/portrait.jpg",
    text="Hi! I am your new assistant.",
    voice_id="en-leo",
    tier="free",
)
print(video["video_url"])

# Singing video: one photo performs a song (paid, slow: minutes)
job = stork.singing_video.create(image_url="https://...jpg", audio_url="https://...mp3", seconds=15)
print(stork.singing_video.wait(job["id"])["video_url"])
```

Every resource has `create`, `get`, `list`, `estimate`, `wait` and
`create_and_wait`. `create` adds an `Idempotency-Key`, so a retried request
never makes or charges for a second job. Errors raise `StorkError` with
`status`, `code`, `param` and `request_id`.

Webhooks:

```python
from storkai import verify_webhook
ok = verify_webhook(raw_body, request.headers["Stork-Signature"], "whsec_...")
```

Docs: https://www.stork.ai/developers (Markdown: https://www.stork.ai/developers.md)
