PiAPI CLI Quick Start: terminal से AI images और videos generate करें

Multimodal AI generation के लिए PiAPI CLI terminal workflow
PiAPI
PiAPI

PiAPI CLI, PiAPI का official command line interface है. इससे आप terminal से images, videos, audio, 3D और LLM workflows के multimodal AI models चला सकते हैं.

यह quick start installation, API key authentication, पहली image command, async video task और available models देखने तक का flow समझाता है.

PiAPI CLI क्या है?

Quick definition

PiAPI CLI एक Node.js command line tool है जिससे आप web dashboard खोले बिना PiAPI models चला सकते हैं.

AI CLI तब उपयोगी है जब generation workflow terminal से शुरू होता है: command save करें, फिर चलाएं, parameters बदलें और scripts या AI agents में इस्तेमाल करें.

  • Repeatable prompts से assets बनाना
  • App या prototype बनाते समय quick tests चलाना
  • Project folder से local files upload करना
  • Outputs को predictable folder में save करना
  • Scripts, CI या agents के लिए JSON return करना

PiAPI CLI एक नजर में

Packagepiapi-cli
Commandpiapi
RuntimeNode.js 18+
मुख्य use caseTerminal-based multimodal AI generation
किसके लिए उपयोगीDevelopers, automation workflows और AI agents

Prerequisites

  • Node.js 18 या नया
  • PiAPI API key
  • Terminal app

PiAPI CLI install करें

अपने पसंदीदा JavaScript package manager से piapi-cli package install करें.

Terminal
npm install -g piapi-cli
Terminal
pnpm add -g piapi-cli
Terminal
bun add -g piapi-cli
Terminal
yarn global add piapi-cli
Terminal
npx piapi-cli@latest --help

PiAPI API key से authenticate करें

Installation के बाद CLI को अपने PiAPI account से connect करें.

Terminal
piapi auth login --api-key sk-xxxxx
Terminal
piapi auth status
Terminal
export PIAPI_API_KEY=sk-...

Terminal से पहली AI image generate करें

Authentication के बाद आप piapi run से terminal में AI image generate कर सकते हैं.

Terminal
piapi run flux-dev prompt="a corgi in space"
Terminal
piapi run gpt-image-2 prompt="a corgi in space" size=1024x1024

Flux API

Terminal से पहला AI video generate करें

Video generation आमतौर पर image generation से ज्यादा समय लेता है, इसलिए video models को async task की तरह शुरू करें.

Terminal
piapi run sora2-pro prompt="ocean waves" --async
Terminal
piapi task get <id>

Sora 2 API / Kling API

Local files upload करें और results download करें

जब input value @ से शुरू होती है, PiAPI CLI local files upload कर सकता है और results को चुने हुए folder में download कर सकता है.

Terminal
piapi run remove-bg image=@./photo.png --download --out-dir ./out

Models explore करें और quota check करें

Models, schema और quota देखने के लिए model commands इस्तेमाल करें.

Terminal
piapi model list
Terminal
piapi model list --type video
Terminal
piapi model schema flux-dev
Terminal
piapi quota

Useful PiAPI CLI flags

Automation के लिए उपयोगी flags:

--asyncCLI workflow option
--downloadCLI workflow option
--out-dir <path>CLI workflow option
--streamCLI workflow option
--dry-runCLI workflow option
--output jsonJSON output for scripts and automation
--webhook <url>CLI workflow option
--quietCLI workflow option
--non-interactiveCLI workflow option

AI agents और automation के साथ PiAPI CLI इस्तेमाल करें

PiAPI CLI को AI agents, shell scripts, CI jobs और automation workflows में भी इस्तेमाल किया जा सकता है.

Terminal
npx skills add PiAPI-1/piapi-cli
Terminal
piapi run flux-dev prompt="a product photo on a white background" --output json

Midjourney n8n integration guide

Common PiAPI CLI issues fix करें

अगर पहली command काम नहीं करती, prompt या model बदलने से पहले ये common issues check करें.

piapi command नहीं मिली

npx piapi-cli@latest --help

API key invalid या missing है

piapi auth status

Video command file की जगह task ID return करती है

piapi task get <id>

Web UI की जगह PiAPI CLI कब इस्तेमाल करें?

जब आपको repeatable, scriptable या AI agent-ready workflow चाहिए, PiAPI CLI इस्तेमाल करें. Web UI visual exploration के लिए बेहतर है; CLI automation के लिए बेहतर है.

FAQ

PiAPI CLI क्या है?

PiAPI CLI एक Node.js command line tool है जिससे आप web dashboard खोले बिना PiAPI models चला सकते हैं.

PiAPI CLI कैसे install करें?

npm install -g piapi-cli / npx piapi-cli@latest --help

क्या terminal से AI images और videos generate कर सकते हैं?

piapi run flux-dev prompt="a corgi in space" / piapi run sora2-pro prompt="ocean waves" --async

PiAPI CLI के साथ build करना शुरू करें

PiAPI CLI developers और AI agents को command line से images, videos, audio, 3D assets और LLM responses generate करने का practical तरीका देता है.

PiAPI CLI PiAPI docs

More Stories

Why Your AI Face Rating Changes: Photo Tips for More Consistent Face Scores

June 5, 2026

AI face ratings can change based on lighting, camera angle, expression, filters, blur, and face visibility. Learn the best selfie tips for more consistent AI face scores.

PiAPI
PiAPI

AI Face Rating Explained: What Face Scores and PSL Ratings Mean

June 4, 2026

Learn what AI face rating means, how PSL face scores became a social-media trend, what face rating AI tools measure, and how to interpret scores safely.

PiAPI
PiAPI