Metadata-Version: 2.2
Name: delula-sdk
Version: 0.1.3
Summary: Delula Public API SDK (beta)
Author: Scrypted Inc.
License: MIT
Project-URL: Homepage, https://delu.la
Project-URL: Documentation, https://delu.la/docs/api
Keywords: delula,api,generative-ai,video,image
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE

# delula-sdk

Python client for the [Delula Public API](https://delu.la) (beta).

## Install

```bash
pip install delula-sdk
```

Requires Python **3.10+**. No third-party dependencies (stdlib only).

## Quick start

Create an API key in Delula → **Account → API**, then:

```python
import os
import uuid
from delula_sdk import DelulaClient

client = DelulaClient(api_key=os.environ["DELULA_API_KEY"])

credits = client.get_credits()
RECIPE_ID = 482  # Branded AI Video
detail = client.get_recipe(RECIPE_ID)
form_data = {
    s["id"]: s["defaultValue"]
    for s in detail.get("recipeSteps") or []
    if s.get("defaultValue") is not None
}

client.preflight_generation(RECIPE_ID, form_data=form_data)

gen = client.create_generation(
    RECIPE_ID,
    form_data=form_data,
    idempotency_key=str(uuid.uuid4()),
)
result = client.wait_for_generation(gen["generationId"])
print(result["status"], result.get("videoUrl") or result.get("mediaUrl"))
```

Default base URL: `https://delu.la/public/api`. Pass `base_url=` for local dev.

Docs: [delu.la/docs/api](https://delu.la/docs/api)

## Beta

Breaking changes may ship in `0.x` without a `/v1` path bump. Pin your version in production.

## License

MIT — see [LICENSE](./LICENSE) (Copyright Scrypted Inc.). Use of the Delula API is subject to [delu.la](https://delu.la) terms.

Support: [support@delu.la](mailto:support@delu.la)
