Skip to content

Add Pollinations.AI to Generative AI resources #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions PollinationsAI-Image-Demo.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Pollinations.AI Image Generation Demo\n",
"\n",
"## English 🇬🇧\n",
"This notebook shows how to generate AI images for your projects using Pollinations.AI.\n",
"\n",
"- No signup or API key needed\n",
"- Works in any language (see Chinese example below)\n",
"\n",
"## 中文 🇨🇳\n",
"本教程演示如何用 Pollinations.AI 免费生成 AI 图片。\n",
"\n",
"- 无需注册或 API 密钥\n",
"- 支持多语言(见下方中文示例)\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import requests\n",
"from IPython.display import Image, display\n",
"\n",
"# English prompt\n",
"prompt_en = \"A robot teaching kids about AI\"\n",
"url_en = f\"https://image.pollinations.ai/prompt/{prompt_en.replace(' ', '%20')}\"\n",
"response_en = requests.get(url_en)\n",
"with open('robot_ai_teacher_en.jpg', 'wb') as f:\n",
" f.write(response_en.content)\n",
"display(Image('robot_ai_teacher_en.jpg'))\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# 中文提示词\n",
"prompt_cn = \"一个机器人正在给孩子们讲解人工智能\"\n",
"url_cn = f\"https://image.pollinations.ai/prompt/{prompt_cn}\"\n",
"response_cn = requests.get(url_cn)\n",
"with open('robot_ai_teacher_cn.jpg', 'wb') as f:\n",
" f.write(response_cn.content)\n",
"display(Image('robot_ai_teacher_cn.jpg'))\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"name": "python",
"version": "3.8"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
101 changes: 101 additions & 0 deletions PollinationsAI-Integration-Guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# Pollinations.AI Integration Guide

## English 🇬🇧

### What is Pollinations.AI?
Pollinations.AI is a free, privacy-first platform for generating images, text, and audio using artificial intelligence. No signup or API key is required—perfect for students and teachers!

- **Website:** [https://pollinations.ai](https://pollinations.ai)
- **API Documentation:** [Pollinations API Docs](https://github.com/pollinations/pollinations/blob/master/APIDOCS.md)

### Key Features
- Free text, image, and audio generation
- No account or API key required
- Supports creative projects and classroom activities
- Safe for kids and schools
- Multilingual support (works with prompts in any language)

### Example: Generate an Image from Text
Just use a browser or code! Try this link:

```
https://image.pollinations.ai/prompt/A%20robot%20teaching%20kids%20about%20AI
```

Or use Python:

```python
import requests
prompt = "A robot teaching kids about AI"
url = f"https://image.pollinations.ai/prompt/{prompt.replace(' ', '%20')}"
response = requests.get(url)
with open('robot_ai_teacher.jpg', 'wb') as f:
f.write(response.content)
print('Image saved!')
```

### Example: Generate Text
```
https://text.pollinations.ai/What%20is%20artificial%20intelligence?
```

### How to Use in Class
- Let students create AI art or stories for their projects
- Use Pollinations.AI to demonstrate generative AI
- No registration or personal data needed

---

## 中文 🇨🇳

### 什么是 Pollinations.AI?
Pollinations.AI 是一个免费的、以隐私为先的人工智能平台,可以生成图片、文本和音频。无需注册或 API 密钥,非常适合学生和老师使用!

- **网站:** [https://pollinations.ai](https://pollinations.ai)
- **API 文档:** [Pollinations API 文档](https://github.com/pollinations/pollinations/blob/master/APIDOCS.md)

### 主要特点
- 免费生成文本、图片和音频
- 无需账户或 API 密钥
- 适合创意项目和课堂活动
- 对孩子和学校安全友好
- 多语言支持(支持任何语言的提示词)

### 示例:用文本生成图片
直接用浏览器或代码!试试这个链接:

```
https://image.pollinations.ai/prompt/一个机器人正在给孩子们讲解人工智能
```

或用 Python:

```python
import requests
prompt = "一个机器人正在给孩子们讲解人工智能"
url = f"https://image.pollinations.ai/prompt/{prompt}"
response = requests.get(url)
with open('robot_ai_teacher_cn.jpg', 'wb') as f:
f.write(response.content)
print('图片已保存!')
```

### 示例:生成文本
```
https://text.pollinations.ai/什么是人工智能?
```

### 课堂使用方法
- 让学生用 AI 创作艺术或故事
- 用 Pollinations.AI 演示生成式 AI
- 无需注册或个人信息

---

## More Languages / 更多语言
Want to help translate? Add your language here!

---

## Contact / 联系我们
For questions or feedback, visit [https://pollinations.ai](https://pollinations.ai) or open an issue on GitHub.
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<img src="https://github.com/eduStack/ai4kid/blob/master/ai4kid-logo.png" width="200px">

Welcome to the ai4kid wiki!本项目整理少儿人工智能编程资源,方便教育者使用。
本项目整理少儿人工智能编程资源,方便教育者使用。

本项目由 <a href="http://www.codelab.club/">CodeLab</a> 维护。

Expand All @@ -23,6 +21,7 @@ Welcome to the ai4kid wiki!本项目整理少儿人工智能编程资源,方

* [Claude Prompt engineering overview](https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/overview)

* [Pollinations.AI](https://pollinations.ai) - 免费、无需注册的生成式AI平台,支持图像、文本和音频生成。[集成指南](./PollinationsAI-Integration-Guide.md) | [图像生成演示](./PollinationsAI-Image-Demo.ipynb)

### 组织和社区

Expand Down Expand Up @@ -164,6 +163,3 @@ OpenBCI代表开源脑机接口(BCI)。我们为任何人提供一台计算
* 编程玩具车Sphero Indi,时代周刊评委2021年度「100个发明」。 https://sphero.com/pages/sphero-indi
* Intelino 英荔诺智能小火车 https://www.intelino.cn/
* https://learningmusic.ableton.com/zh-Hans/ 音乐创作之旅