$ piapi run flux-dev prompt="a corgi" aspect_ratio=16:9Generate image
94 Multimodal AI Models from Your Terminal
Generate AI images, videos, audio, 3D assets, and chat with LLMs from one command line interface. PiAPI CLI is built for developers, AI agents, and automation workflows.
Run piapi model list to browse all models
$ piapi run flux-dev prompt="a corgi astronaut"$ piapi run flux-dev prompt="a corgi" aspect_ratio=16:9Generate image
$ piapi run gpt-4o prompt="hello" --streamChat with streaming
$ piapi run sora2-pro prompt="waves" --asyncGenerate video (async)
$ piapi run remove-bg image=@./photo.png --downloadUpload & download

Install PiAPI CLI, authenticate your API key, and run your first image or video generation command from the terminal.

Use PiAPI CLI as a command line AI tool to generate images from terminal prompts, save outputs locally, and automate repeatable image workflows.
PiAPI CLI is a command line interface for running PiAPI models from your terminal. It works as an AI CLI tool for image, video, audio, 3D, and chat generation workflows.
Run piapi auth login --api-key sk-xxxxx with your PiAPI API key. You can get your API key from the PiAPI workspace. On shared machines, use the environment variable PIAPI_API_KEY=sk-... instead.
Yes. Use piapi run flux-dev prompt="a corgi astronaut" or another image model to generate AI images from terminal commands. Add --download to save generated files locally.
Prefix any input with @ to upload a local file. For example: piapi run remove-bg image=@./photo.png. The file is automatically uploaded before the model runs. Upload requires a paid PiAPI plan.
Yes! PiAPI CLI is designed for AI agent integration. Add it as a skill with npx skills add PiAPI-1/piapi-cli.
The CLI itself is free and open source (MIT license). You need a PiAPI account to use the models - new accounts get free credits to try. See piapi.ai/pricing for model pricing.
Install globally with npm: npm install -g piapi-cli. You can also use pnpm, yarn, or bun. Alternatively, run without installing using npx piapi-cli@latest. Requires Node.js 18+.
PiAPI CLI supports 94 multimodal AI models: 34 image models (Flux, Seedream, Nano Banana), 40 video models (Sora 2, Kling 3, Veo 3), 10 audio models (F5-TTS, MMAudio), 2 3D models (Trellis), and 8 LLM models (GPT-4o, Claude). Run piapi model list to see all available models.
Yes. Use video models such as Sora, Kling, Veo, Seedance, Hailuo, and Luma to generate AI videos from terminal workflows. Video jobs usually use --async so you can check task status later.
Add --download to any command to automatically save generated files. Use --out-dir ./output to specify a custom output directory. Works for both URL outputs and base64 payloads.
LLM and gpt-image-2 models run synchronously (results return immediately). Video and 3D models require --async flag and return a task ID for polling. Use piapi task get <id> to check status.