@pollinations_ai/cli
v0.1.1
Published
The Pollinations CLI — for humans, AI agents, and everything in between
Readme
@pollinations_ai/cli
The Pollinations CLI — for humans, AI agents, and everything in between.
Generate text, images, audio, video from the terminal. Backed by the Pollinations API.
https://github.com/user-attachments/assets/6b200d95-d734-469c-9fe5-3e63549778fe
npx @pollinations_ai/cli gen image "a cat in space" --output cat.pngFor AI agents
Point your coding agent (Claude Code, Cursor, Windsurf, Codex) at the skill file and it gets the full usage map — flags, stdin conventions, --json output shape, error codes, the lot:
Read https://raw.githubusercontent.com/pollinations/pollinations/main/packages/polli-cli/SKILL.md and follow the instructions to generate media with the
polliCLI.
The skill also ships inside the package: node_modules/@pollinations_ai/cli/SKILL.md.
Every command is agent-friendly:
--json— structured stdout, human messages to stderr. Safe to parse.- Exit code
0on success, non-zero on error. - When a call runs out of pollen, the first line of the error is the top-up link.
polli auth status --jsonexposes everything about the current session.
Get started
npm install -g @pollinations_ai/cli # installs the `polli` binary
polli auth login # device-flow via enter.pollinations.aiCredentials land at ~/.pollinations/credentials.json. For one-off runs pass --key sk_... or set POLLINATIONS_API_KEY. Get keys at enter.pollinations.ai.
Generate
polli gen text "Explain quantum tunneling in one sentence"
polli gen text "Summarize this" < notes.md # stdin becomes context
echo "context" | polli gen text "question"
polli gen image "cyberpunk city at night" --model flux --output city.png
polli gen image "enhance this" --image https://media.pollinations.ai/abc --model gptimage
polli gen audio "Hello world" --voice nova --output speech.mp3
polli gen audio "read it to me" --play # plays back after saving (blocks until done)
polli gen video "a waterfall in slow motion" --duration 5 --output clip.mp4
polli gen transcribe speech.mp3
polli gen chat --model openai # interactive multi-turngen text streams by default. File-output commands pick a sensible default path if --output is omitted.
Discover
polli models # all models
polli models --type image # filter
polli models --stats # health + perf (last 60m)
polli docs # full API reference in the terminal
polli docs /image # one endpoint
polli docs --open # open in browserAccount
polli keys list
polli keys create --name mybot --budget 100
polli keys revoke <id>
polli usage # pollen balance
polli usage --history # recent requests
polli usage --daily # daily spendLinks
- gen.pollinations.ai — API
- enter.pollinations.ai — dashboard, keys, billing
- API docs
- Source
- Discord
License
MIT
