Metadata-Version: 2.4
Name: kavel
Version: 0.1.0
Summary: Generate images from a prompt with no API key and no account
Author: hanshs474
License: MIT
Project-URL: Homepage, https://www.kavel.ai/?ref=pypi
Project-URL: Image tools, https://www.kavel.ai/image?ref=pypi
Project-URL: Video tools, https://www.kavel.ai/video?ref=pypi
Project-URL: Source, https://github.com/hanshs474/kavel-image-skill
Keywords: ai,image-generation,text-to-image,image-editing,no-api-key
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Multimedia :: Graphics
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# kavel

Generate images from a prompt with **no API key and no account**.

```python
from kavel import generate

url = generate("a paper-cut layered mountain range at dusk, warm rim light")
```

That is the whole setup. No key to fetch, no config file, no dependencies —
standard library only. It calls the anonymous endpoint on
[Kavel](https://www.kavel.ai/?ref=pypi), an online AI image and video studio.

## Editing a photo

Pass `image_url` and the prompt describes the change rather than the picture:

```python
url = generate(
    "restyle the hair into a shoulder-length layered cut, "
    "keep the same face, skin and lighting",
    image_url="https://example.com/portrait.jpg",
)
```

Naming what must stay is what holds the likeness. Prompts that only name the
edit tend to drift the whole face.

## What the free tier actually covers

| | |
|---|---|
| Anonymous grant | 15 credits |
| Text-to-image | 5 credits — so the grant covers two |
| Photo edit (`nano-banana-2-lite`) | 15 credits — exactly one |
| Per-IP ceiling | 30 credits a day |

Anonymous output is 1K and watermarked. Signing in on
[kavel.ai](https://www.kavel.ai/?ref=pypi) removes the watermark and opens the
larger models.

**Video is deliberately not exposed here.** The cheapest clip is 40 credits
against a 15-credit anonymous wallet, so a signed-out call cannot succeed at
any setting. Signed-out video on the site runs on a browser-side engine
instead — see [the video tools](https://www.kavel.ai/video?ref=pypi).

## Errors worth catching

`KavelError` covers the three things that actually happen:

- the content filter refused the prompt (credits are spent either way, so
  rewrite rather than retry)
- the queue ran past `timeout`
- the per-IP daily ceiling returned 429

## Prompts that work

Kavel keeps a page per edit, each preloaded with a prompt for that specific
job — [hairstyle](https://www.kavel.ai/image/ai-hairstyle-changer?ref=pypi),
[outfit](https://www.kavel.ai/image/ai-outfit-generator?ref=pypi),
and the rest under [image tools](https://www.kavel.ai/image?ref=pypi).

MIT licensed.
