返回顶部
p

pollinations-aiPollinations AI

Generate images, music, and video using Pollinations AI API. Use when: (1) User wants to create images from text prompts, (2) User wants to generate music/audio, (3) User wants to create videos from text, (4) Using AI image generation with models like flux, zimage, nanobanana.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.4
安全检测
已通过
434
下载量
免费
免费
1
收藏
概述
安装方式
版本历史

pollinations-ai

Pollinations AI - 图像、音乐与视频生成

一个使用Pollinations AI API生成图像、音乐和视频的综合技能。

概述

Pollinations.ai提供免费的AI生成服务,支持API密钥。本技能支持:

  • - 图像生成 - 使用最先进的模型从文本提示创建图像
  • 音乐/音频生成 - 生成背景音乐和音频轨道
  • 视频生成 - 从文本描述创建视频

前提条件

1. 获取API密钥

访问pollinations.ai获取免费API密钥。

2. 设置环境变量

添加到您的shell配置文件(~/.bashrc或~/.zshrc):

bash
export POLLINATIONSAPIKEY=yourapikey_here

然后重新加载:
bash
source ~/.bashrc

3. 安装依赖

bash
pip install requests Pillow

安全配置

必需的环境变量

变量必需描述
POLLINATIONSAPIKEY来自pollinations.ai的API密钥

可选的环境变量

变量默认值描述
TELEGRAMCHATID(无)用于Telegram发送的聊天ID。如果未设置,--telegram标志将被禁用
ALLOWEDOUTPUTDIRS
., /tmp | 允许的输出目录列表,以逗号分隔 | | OPENCLAW_WORKSPACE | ~/.openclaw/workspace | 输出文件的工作空间目录 |

注意: --telegram标志需要显式设置TELEGRAMCHATID。如果未设置,该功能将被禁用以确保安全。

可用脚本

脚本用途
pollinationsimagegen.py从文本提示生成图像
pollinationsaudiogen.py
生成音乐和音频 | | pollinationsvideogen.py | 从文本生成视频 |

使用方法

图像生成

bash

基本用法


python pollinationsimagegen.py 一只可爱的猫 --output cat.jpg

使用特定模型和增强功能

python pollinationsimagegen.py 赛博朋克城市夜景 --model flux --enhance --width 1920 --height 1080 --output city.jpg

使用不同模型

python pollinationsimagegen.py 你的提示 --model zimage python pollinationsimagegen.py 你的提示 --model flux-2-dev # 免费层级

参数:

参数描述默认值
prompt所需图像的文本描述(必需)
--model
使用的AI模型 | flux |
| --width | 图像宽度(像素) | 1024 |
| --height | 图像高度(像素) | 1024 |
| --enhance | 启用AI提示增强 | false |
| --seed | 固定随机种子以实现可重复性 | 随机 |
| --safe | 启用安全模式 | false |
| --output | 输出文件名 | output.jpg |
| --telegram | 通过Telegram发送结果(需要TELEGRAMCHATID) | false |

音乐/音频生成

bash

从提示生成音乐


python pollinationsaudiogen.py 欢快的电子舞曲 --output music.mp3

自定义时长

python pollinationsaudiogen.py 平静的钢琴旋律 --duration 60 --output piano.mp3

参数:

参数描述默认值
prompt所需音乐的描述(必需)
--model
音频模型 | suno-4 |
| --duration | 时长(秒) | 30 |
| --output | 输出文件名 | output.mp3 |

视频生成

bash

生成视频


python pollinationsvideogen.py 一只猫在玩球 --output video.mp4

自定义时长和宽高比

python pollinationsvideogen.py 海浪 --duration 30 --aspectRatio 16:9 --output ocean.mp4

参数:

参数描述默认值
prompt所需视频的描述(必需)
--model
视频模型 | suno-4 |
| --duration | 时长(秒) | 10 |
| --aspectRatio | 视频宽高比(16:9或9:16) | 16:9 |
| --output | 输出文件名 | output.mp4 |

支持的模型

图像模型

模型描述质量
flux默认高质量模型⭐⭐⭐⭐⭐
flux-2-dev
最新flux(免费) | ⭐⭐⭐⭐⭐ | | zimage | 快速生成 | ⭐⭐⭐⭐ | | nanobanana | 创意/艺术风格 | ⭐⭐⭐⭐ | | gptimage | 基于OpenAI | ⭐⭐⭐⭐ | | seedream | 高细节 | ⭐⭐⭐⭐ |

音频模型

模型描述
suno-4最新版本(推荐)⭐
suno-3.5
先前版本 | | suno-3 | 旧版模型 |

视频模型

模型描述
suno音乐视频生成 ⭐
veo-3.1
Google视频AI | | seedance | 高质量 | | wan | 开源选项 | | ltx-2 | 快速生成 |

安全特性

本技能包含多项安全措施:

  1. 1. 路径遍历保护 - 所有输出路径都经过允许目录验证
  2. 环境变量验证 - Telegram发送需要显式选择启用
  3. 无硬编码凭证 - 所有凭证来自环境变量
  4. 文件访问白名单 - 只能写入已配置的目录

故障排除

错误原因解决方案
401 未授权API密钥缺失或无效正确设置POLLINATIONSAPIKEY
403 禁止访问
API密钥权限不足 | 在pollinations.ai检查密钥权限 | | 429 请求过多 | 超出速率限制 | 等待后再发起更多请求 | | 402 需要付款 | 余额不足 | 在pollinations.ai充值 |

参考

  • - API文档:https://gen.pollinations.ai/api/docs
  • Pollinations网站:https://pollinations.ai/

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 pollinations-ai-1776202082 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 pollinations-ai-1776202082 技能

通过命令行安装

skillhub install pollinations-ai-1776202082

下载

⬇ 下载 pollinations-ai v1.0.4(免费)

文件大小: 9.58 KB | 发布时间: 2026-4-15 12:38

v1.0.4 最新 2026-4-15 12:38
- Updated default video model from "suno" to "suno-4" in the video generation section.
- No functionality or parameter changes; documentation update only.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部