Metadata-Version: 2.4
Name: veida
Version: 0.1.0
Summary: Generate AI images from Python with no API key, no account and no card.
Author-email: Veida <hanshs474@gmail.com>
License: MIT
Project-URL: Homepage, https://veida.ai
Project-URL: Documentation, https://veida.ai/image
Project-URL: Source, https://github.com/hanshs474/veida-python
Project-URL: Issues, https://github.com/hanshs474/veida-python/issues
Keywords: ai,image-generation,text-to-image,no-api-key,chatgpt-image,generative-ai
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Multimedia :: Graphics
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# veida

Generate images from Python with **no API key, no account and no card**.

```python
from veida import generate

url = generate("a paper boat on a calm lake at sunrise, soft light", aspect_ratio="16:9")
print(url)   # https://cdn.veida.ai/uploads/kie/image/....webp
```

From the shell:

```bash
pip install veida
python -m veida "an isometric illustration of a small coffee shop, pastel palette" --ratio 16:9
```

Every other image library wants a key from OpenAI, fal or Replicate before it runs once.
This one talks to the anonymous tier of [Veida](https://veida.ai/?utm_source=pypi&utm_medium=package) — a client id the
library invents rather than an account you register — so it works on a fresh machine.

## What you get

- **Zero dependencies.** Standard library only, so there is nothing to pin and nothing that
  can drift out from under you.
- **A url, not bytes.** The returned CDN link is permanent and cacheable, so it drops
  straight into a template, a Slack message or a database row.
- **Readable failures.** `VeidaError` carries a sentence about what to do — quota spent,
  content filter, timeout — instead of a stack trace you have to interpret.

## Limits, read out of the running service

- The anonymous grant is **4 credits** and one image costs **4**, so the library mints a
  **fresh caller per call**. A loop is not limited to one image.
- A ceiling of **30 credits per IP per day** sits on top: roughly **7 images a day** from
  one machine. When it is spent you get a `VeidaError` saying so.
- Free output is **1K and watermarked**.
- 🔴 **Editing an existing image is not available anonymously.** The editing model costs 30
  credits against a 4-credit grant, so an anonymous edit can never be paid for — this
  library does not pretend to offer one. Sign in and use the
  [image editor](https://veida.ai/image/nano-banana-2-lite?utm_source=pypi&utm_medium=package) or the
  [ChatGPT image editor](https://veida.ai/image/chatgpt-image-editor?utm_source=pypi&utm_medium=package).
- There is no video on this service.

Signing in removes the watermark, lifts the cap and opens the rest of the shelf —
[GPT Image 2](https://veida.ai/image/gpt-image-2?utm_source=pypi&utm_medium=package) when the picture must contain readable
text, [Nano Banana 2](https://veida.ai/image/nano-banana-2?utm_source=pypi&utm_medium=package) for instruction following,
[Seedream 5.0 Lite](https://veida.ai/image/seedream-5-lite?utm_source=pypi&utm_medium=package) for colour and composition,
[Qwen Image 3](https://veida.ai/image/qwen-image-3?utm_source=pypi&utm_medium=package) for typography. What each tier costs
is on the [pricing page](https://veida.ai/pricing?utm_source=pypi&utm_medium=package).

## Writing prompts that work

Name the light, the material and the composition. "A product photo of a mug" gives the
model nothing; "matte black ceramic mug on pale oak, soft window light from the left,
shallow depth of field" gives it a picture. Worked examples live in the
[prompt library](https://veida.ai/image/prompts?utm_source=pypi&utm_medium=package), and finished output in the
[showcase](https://veida.ai/showcases?utm_source=pypi&utm_medium=package).

The same engine backs the
[ChatGPT image generator](https://veida.ai/image/chatgpt-image-generator?utm_source=pypi&utm_medium=package) and the
[free AI image generator](https://veida.ai/image?utm_source=pypi&utm_medium=package) in a browser. There is also an
[MCP server](https://www.npmjs.com/package/veida-mcp) if you want the same thing inside an
agent.

## API

```
generate(prompt, aspect_ratio="1:1", timeout=240.0, poll_every=4.0) -> str
```

`aspect_ratio` is one of `1:1`, `16:9`, `9:16`, `4:3`, `3:4`. Raises `VeidaError`.

MIT.
