polli

Generate images, text, audio, and video via the Pollinations API using the polli CLI.

5.0k|1.0k|Updated Apr 15, 2021
One-click install
npx skills add https://github.com/pollinations/pollinations --skill polli
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: polli
Source: https://github.com/pollinations/pollinations/tree/main/packages/polli-cli
Command: npx skills add https://github.com/pollinations/pollinations --skill polli

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires chalk, commander, open, yaml.

What problem does it solve?

It gives AI agents and terminal users a single command-line interface to the Pollinations API, covering media generation, model discovery, and account management without writing HTTP client code.

Core Features & Use Cases

  • Media Generation: Create images, text, audio (TTS, music, sound effects), and video, plus transcribe speech, all through polli gen subcommands with --json machine-readable output.
  • Account & Key Management: Check pollen balance and usage history, create scoped or publishable API keys, inspect quests and earnings, and manage hosted prompt agents and community my-models.
  • Model Discovery & Health: List live models by type, filter by capabilities like vision or reasoning, and check latency and error-rate stats before choosing a model.
  • Use Case: An AI coding agent asked to "generate a hero image for this landing page" runs polli gen image "..." --output hero.png, uploads local assets with polli upload when a public URL is needed, and verifies costs with polli usage --history.

Quick Start

Ask the agent to generate an image of a fox reading a book and save it to fox.png using the polli CLI.

Frequently Asked Questions about polli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate an image with the polli CLI?

Run `polli gen image "your prompt" --output out.png` after logging in with `polli auth login`. Defaults are the zimage model at 1024x1024; pick another model with `--model flux` or list options via `polli models --type image`.

How do I install and authenticate the Pollinations CLI?

Install with `npm i -g @pollinations/cli@latest`, which provides the `polli` binary on Node.js 20 or later. Authenticate with `polli auth login` for device-flow login, or pipe an existing key with `printf '%s' "$POLLINATIONS_API_KEY" | polli auth login --with-token`.

Can polli edit images or use local files as input?

Yes, but `--image` only accepts public HTTPS URLs and only works with models listing "image" in input_modalities, such as nanobanana or kontext. Upload local files first with `polli upload path/to.png` to get a public URL.

Does polli support machine-readable output for scripting?

Every command supports `--json`, which emits structured JSON to stdout while human messages go to stderr. Exit code 0 indicates success and non-zero indicates auth failures, rate limits, or invalid arguments, making it safe to pipe into jq.

Why does polli gen video ignore my duration or aspect-ratio flags?

Flag support varies per video model and is not validated client-side. For example, wan-fast is locked to 5-second 16:9 output regardless of `--duration` or `--aspect-ratio`, so verify results with ffprobe and check `polli models --type video --json` for capabilities.

What are the limitations of polli usage history?

Usage history is eventually consistent, so a fresh request may not appear for 30 to 60 seconds. Use `polli usage --history --limit 50 --json` and filter by timestamp, retrying if an expected entry is missing.