@pollo-ai/cli
v0.14.0
Published
Pollo CLI — generate images and videos through the Pollo platform API, and run as a local stdio MCP server.
Readme
@pollo-ai/cli
Generate images and videos with Pollo AI from your terminal — or expose the same capabilities to an AI coding agent over MCP.
Install
npm i -g @pollo-ai/cliWorks on macOS, Linux and Windows. The package is a small Node shim; the actual
binary ships in a per-platform package that npm picks for your machine, so
nothing is downloaded by a postinstall hook.
Without Node (macOS and Linux):
curl -fsSL https://raw.githubusercontent.com/polloaiofficial/cli/main/install.sh | shLog in
pollo auth loginThis opens your browser, you sign in to Pollo, and the CLI stores the resulting
token in ~/.config/pollo/config.json with file mode 0600. The short-lived
token refreshes itself before each request, so you won't be asked again until the
long-lived one expires.
pollo account statusShows who you are, your available credits, and your subscription. If this works, you're set up.
Generate
Pick a model, then read what it accepts before you build a request — parameters differ a lot between models:
pollo model list # every available model
pollo model list --type text2video # only models with that capability
pollo model get google/nano-banana --fields--type filters by capability: text2video, image2video, ref2video,
text2image, image2image. Each model is listed once with its capabilities
aggregated.
model get --fields returns each endpoint's fields
({name, type, description, values?, min?, max?}) plus cross-field
constraints ({id, message, expr}) — already flat, no JSON Schema to parse.
Then submit and wait:
# Optional: estimate the credit cost first
pollo generate cost bytedance/seedance-2-0-fast --prompt "studio product video" --duration 5
pollo generate create bytedance/seedance-2-0-fast \
--prompt "studio product video" --duration 5 --json # -> { "taskId": "…" }
pollo generate wait <taskId> --json # -> result URLsMore examples:
# Text to image
pollo generate create openai/gpt-image-2 --prompt "a cozy cabin in a snowy forest" --json
# Image to image — a local path is uploaded for you, or pass an HTTPS URL
pollo generate create google/nano-banana --image ./photo.png --prompt "make it nighttime" --json
# Reference images (repeat the flag for several)
pollo generate create alibaba/happyhorse-1.1 --refs ./product.png --prompt "slow orbit around the bottle" --json
# A model with both video and image output needs --type
pollo generate create kling-ai/kling-v3-omni --type image --prompt "poster" --json
# Four outputs in one task, billed per output
pollo generate create bytedance/seedance-2-0-fast --prompt "studio product" --numOutputs 4 --json
pollo generate get <taskId> --json # one-shot status check
pollo generate list --json # your recent jobsNotes on the flags:
- Every
--name valueyou pass becomes an input field. Values are typed automatically:true/false→ boolean, numeric strings → number, everything else → string. Repeat a flag to build an array. - Image and video fields (
--image,--images,--refs) take either a local file path or an HTTPS URL. Local files are uploaded as part of the generation; JPG and PNG only, so convert webp/heic first. --typeis only needed when a model has both video and image output — the CLI resolves the endpoint on its own otherwise, and tells you when it can't.--numOutputs N(1–4) produces N outputs in one task.costis billed per output, andget/waitlist every one of them.--webhookUrl <url>gets you a callback instead of polling.--jsonprints the raw response. Without it,get/waitprint a human summary of only the first output, so use--jsonwhen you asked for several.
When something fails
generate wait --json gives you a failMsg per output. Two cases worth
distinguishing:
- Content moderation — change the prompt, not the model.
- Insufficient credits — the error carries a recharge link; retrying or switching models won't help.
Use as an MCP server
pollo mcp runs the CLI as a local stdio MCP server, so MCP-capable clients
(Claude Code, Cursor, Claude Desktop, …) can drive Pollo directly. It reuses the
login above — run pollo auth login once and the server picks up the same
credentials.
Claude Code:
claude mcp add --scope user pollo -- pollo mcpCursor (~/.cursor/mcp.json or a project .cursor/mcp.json), Claude Desktop
(claude_desktop_config.json), and other stdio clients take the same shape:
{
"mcpServers": {
"pollo": { "command": "pollo", "args": ["mcp"] }
}
}Tools exposed: pollo_account_status, pollo_list_models (pass
format: "fields" to read a model's input fields), pollo_estimate_generation_cost,
pollo_generate_image, pollo_generate_video, pollo_get_generation_status.
The generate_* tools return {taskId, status} immediately — poll
pollo_get_generation_status for the result URLs. Image inputs accept a local
path or an HTTPS URL; there is no separate upload tool.
Teach an AI agent to use this
There's an agent skill that walks a coding agent through model choice, input preparation, cost estimation and polling:
npx skills add polloaiofficial/skillsReference
pollo --help
pollo <command> --helpGlobal flags: --json (raw JSON), --no-color.
Credentials live in ~/.config/pollo/config.json (or
$XDG_CONFIG_HOME/pollo/config.json) at mode 0600. pollo auth logout removes
them.
License
MIT
