<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)
Raw data
{
"_id": null,
"home_page": "https://pollinations.ai/",
"name": "pollinations",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "pollinations, pollinations.ai, pollinations-ai, pollinations_ai",
"author": "git.pollinations.ai",
"author_email": "\"pollinations.ai\" <hello@pollinations.ai>, \"dev.pollinations.ai\" <git.pollinations.ai@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/94/83/ff1ae3911abf73fbfc02dad69ce055b22cda82bbc8baee1b069dad226d89/pollinations-2.1.tar.gz",
"platform": null,
"description": "<div id=\"header\">\r\n <img src=\"https://i.ibb.co/p049Y5S/86964862.png\" width=\"50\"/> <img src=\"https://i.ibb.co/r6JZ336/sketch1700556567238.png\" width=\"250\">\r\n</div>\r\n\r\n# [pollinations.ai - Image Generation](https://pypi.org/project/pollinations.ai)\r\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/toolkitr/tkr/blob/main/LICENSE)\r\n[![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/)\r\n\r\n```\r\npollinations.ai: (https://pollinations.ai/)\r\n\r\nWork with the best generative models from Pollinations using this python wrapper.\r\n```\r\n\r\n## Installing\r\n```shell\r\npip install -U pollinations\r\npip install -U pollinations.ai\r\n\r\n# Linux/macOS\r\npython3 -m pip install -U pollinations\r\npython3 -m pip install -U pollinations.ai\r\n\r\n# Windows\r\npy -3 -m pip install -U pollinations\r\npy -3 -m pip install -U pollinations.ai\r\n```\r\n\r\n## Image Model\r\n```python\r\nimport pollinations\r\n\r\nimage_model: pollinations.ImageModel = pollinations.image(\r\n model = pollinations.image_default,\r\n seed = 0,\r\n width = 1024,\r\n height = 1024,\r\n enhance = False,\r\n nologo = False,\r\n private = False,\r\n)\r\n\r\nimage_model.generate(\r\n prompt = \"A black cat in a cyberpunk city.\",\r\n negative = \"Anime, cartoony, childish.\",\r\n save = True,\r\n file = \"image-output.png\",\r\n)\r\n```\r\n## Text Model\r\n```python\r\nimport pollinations\r\n\r\ntext_model: pollinations.TextModel = pollinations.text(\r\n frequency_penalty = 0,\r\n presence_penalty = 0,\r\n temperature = 0.5,\r\n top_p = 1,\r\n model = pollinations.text_default,\r\n stream = True,\r\n contextual = True, # True: Holds conversation context up to 10. False: Has no conversation context\r\n system = \"You are a polite AI Assistant named Pollinations! Use emojis and markdown as you wish.\"\r\n)\r\n\r\ntext_model.generate(\r\n prompt=\"What is 1+1?\",\r\n display=True\r\n)\r\ntext_model.generate(\r\n prompt=\"Now add 10 to that.\",\r\n display=True\r\n)\r\ntext_model.image(\r\n file=\"my_file.png\"\r\n)\r\ntext_model.generate(\r\n prompt=\"Describe that file.\",\r\n display=True\r\n)\r\n```\r\n\r\n# Links\r\n- [Pollinations.ai](https://pollinations.ai/)\r\n- [Discord](https://discord.gg/8HqSRhJVxn)\r\n- [Github](https://github.com/pollinations)\r\n- [Youtube](https://www.youtube.com/channel/UCk4yKnLnYfyUmCCbDzOZOug)\r\n- [Instagram](https://instagram.com/pollinations_ai)\r\n- [Twitter (X)](https://twitter.com/pollinations_ai)\r\n",
"bugtrack_url": null,
"license": null,
"summary": "pollinations.ai | Image Generation",
"version": "2.1",
"project_urls": {
"Discord": "https://discord.gg/8HqSRhJVxn",
"Github": "https://github.com/pollinations",
"Homepage": "https://pollinations.ai/",
"Instagram": "https://instagram.com/pollinations_ai",
"Twitter": "https://twitter.com/pollinations_ai",
"Website": "https://pollinations.ai/",
"YouTube": "https://www.youtube.com/channel/UCk4yKnLnYfyUmCCbDzOZOug"
},
"split_keywords": [
"pollinations",
" pollinations.ai",
" pollinations-ai",
" pollinations_ai"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "006667cf4cb26176f02ca739c98fbd3db667d5015de65bed8afa825bffd5adf6",
"md5": "abaf1e9b83370fee60c9c02303bfab08",
"sha256": "3b864a15f0ef5a4c285f752209fd9ba2334a5cded3a3cd84126326788c2178c7"
},
"downloads": -1,
"filename": "pollinations-2.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "abaf1e9b83370fee60c9c02303bfab08",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 6263,
"upload_time": "2024-11-13T02:35:26",
"upload_time_iso_8601": "2024-11-13T02:35:26.562481Z",
"url": "https://files.pythonhosted.org/packages/00/66/67cf4cb26176f02ca739c98fbd3db667d5015de65bed8afa825bffd5adf6/pollinations-2.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "9483ff1ae3911abf73fbfc02dad69ce055b22cda82bbc8baee1b069dad226d89",
"md5": "3bdb0ecace052a845cc581af8485c18e",
"sha256": "4cb49302aa98511308039f87533c831c15cd0cb5b771dd16665b7cf21d2062dc"
},
"downloads": -1,
"filename": "pollinations-2.1.tar.gz",
"has_sig": false,
"md5_digest": "3bdb0ecace052a845cc581af8485c18e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 6673,
"upload_time": "2024-11-13T02:35:27",
"upload_time_iso_8601": "2024-11-13T02:35:27.467778Z",
"url": "https://files.pythonhosted.org/packages/94/83/ff1ae3911abf73fbfc02dad69ce055b22cda82bbc8baee1b069dad226d89/pollinations-2.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-13 02:35:27",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "pollinations"
}