Metadata-Version: 2.1
Name: pollinations.ai
Version: 2.1
Summary: pollinations.ai | Image Generation
Home-page: https://pollinations.ai/
Author: git.pollinations.ai
Author-email: "pollinations.ai" <hello@pollinations.ai>, "dev.pollinations.ai" <git.pollinations.ai@gmail.com>
Project-URL: Website, https://pollinations.ai/
Project-URL: Discord, https://discord.gg/8HqSRhJVxn
Project-URL: Github, https://github.com/pollinations
Project-URL: YouTube, https://www.youtube.com/channel/UCk4yKnLnYfyUmCCbDzOZOug
Project-URL: Instagram, https://instagram.com/pollinations_ai
Project-URL: Twitter, https://twitter.com/pollinations_ai
Keywords: pollinations,pollinations.ai,pollinations-ai,pollinations_ai
Classifier: License :: OSI Approved :: MIT License
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Classifier: Typing :: Typed
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE.md
Requires-Dist: pillow
Requires-Dist: chardet

<div id="header">
  <img src="https://i.ibb.co/p049Y5S/86964862.png" width="50"/>   <img src="https://i.ibb.co/r6JZ336/sketch1700556567238.png" width="250">
</div>

# [pollinations.ai - Image Generation](https://pypi.org/project/pollinations.ai)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/toolkitr/tkr/blob/main/LICENSE)
[![Python Versions](https://img.shields.io/badge/python-3.7%20|%203.8%20|%203.9%20|%203.10%20|%203.11%20|%203.12%20-blue)](https://www.python.org/downloads/)

```
pollinations.ai: (https://pollinations.ai/)

Work with the best generative models from Pollinations using this python wrapper.
```

## Installing
```shell
pip install -U pollinations
pip install -U pollinations.ai

# Linux/macOS
python3 -m pip install -U pollinations
python3 -m pip install -U pollinations.ai

# Windows
py -3 -m pip install -U pollinations
py -3 -m pip install -U pollinations.ai
```

## Image Model
```python
import pollinations

image_model: pollinations.ImageModel = pollinations.image(
    model = pollinations.image_default,
    seed = 0,
    width = 1024,
    height = 1024,
    enhance = False,
    nologo = False,
    private = False,
)

image_model.generate(
    prompt = "A black cat in a cyberpunk city.",
    negative = "Anime, cartoony, childish.",
    save = True,
    file = "image-output.png",
)
```
## Text Model
```python
import pollinations

text_model: pollinations.TextModel = pollinations.text(
    frequency_penalty = 0,
    presence_penalty = 0,
    temperature = 0.5,
    top_p = 1,
    model = pollinations.text_default,
    stream = True,
    contextual = True, # True: Holds conversation context up to 10. False: Has no conversation context
    system = "You are a polite AI Assistant named Pollinations! Use emojis and markdown as you wish."
)

text_model.generate(
    prompt="What is 1+1?",
    display=True
)
text_model.generate(
    prompt="Now add 10 to that.",
    display=True
)
text_model.image(
    file="my_file.png"
)
text_model.generate(
    prompt="Describe that file.",
    display=True
)
```

# Links
- [Pollinations.ai](https://pollinations.ai/)
- [Discord](https://discord.gg/8HqSRhJVxn)
- [Github](https://github.com/pollinations)
- [Youtube](https://www.youtube.com/channel/UCk4yKnLnYfyUmCCbDzOZOug)
- [Instagram](https://instagram.com/pollinations_ai)
- [Twitter (X)](https://twitter.com/pollinations_ai)
