Live on npm as picx-cli
PicX CLI
Images and video from the terminal — or from any AI agent that can run a shell command. Every command speaks --json.
npm i -g picx-cli- Step 1
Install
From npm, on Node 20 or later.
npm i -g picx-cli - Step 2
Add your API key
Create a key on the API keys page, set it, then check it with picx whoami.
export PICX_API_KEY=pxsk_YOUR_KEY - Step 3
Generate
Every command speaks --json.
picx image "a sunset over mountains, oil painting style"
One command line for images and video
Use it yourself, script it, or hand it to an agent.
Images from one command
Text to image with PicX's model lineup — product shots, ads and social content, straight from your terminal.
picx image <prompt>COMMANDGenerate an image from a text prompt
$ picx image "mango juice splash ad, warm orange studio" --size 2K
{ "images": [{ "url": "https://cdn.picxstudio.com/…", "size": "2K" }],
"credits_used": 53 }
Edit with an instruction
AI editing across one to five source images at once — backgrounds, lighting, style transfer. Upload a local file first with picx upload.
picx upload <file>COMMANDUpload a local file to get an HTTPS URL for edit/video input
picx image edit <instruction> --image-urls <urls>COMMANDEdit one or more existing images with an AI instruction
Video with job polling
Text, image or reference-driven video. The command returns a job, and picx job tells you when it's done.
picx video <prompt>COMMANDGenerate a video from a text prompt (text/image/reference mode)
picx job <id>COMMANDPoll a generation job's status and get the result URL when done
1K, 2K or 4K, any shape
Pick the size and aspect ratio per command: 1:1, 16:9, 9:16, 4:3 or 3:2.
picx image <prompt>COMMANDGenerate an image from a text prompt
picx modelsCOMMANDList available models and their live credit costs
Built for agents
Structured --json output on every command, so any agent that can run a shell command can use PicX.
picx image <prompt>COMMANDGenerate an image from a text prompt
picx mcp install --client <claude|cursor>COMMANDInstall and configure the PicX MCP server for an MCP client
Content at scale
Loop over a folder, upload each photo and edit it in one script. Every result keeps a permanent link.
picx upload <file>COMMANDUpload a local file to get an HTTPS URL for edit/video input
picx image edit <instruction> --image-urls <urls>COMMANDEdit one or more existing images with an AI instruction
Your agent runs the commands
Any agent that can run a shell command can use PicX. Copy a prompt to try it.
- 01of 05
Your agent runs the commands
Make four ad concepts for my drinks brand — juice splash, wellness, botanical and cold brew.
Any shell-based agent can call picx. It reads the --json output and hands you the links.
Make four ad concepts for my drinks brand — juice splash, wellness, botanical and cold brew.
picx image "…" --json ×4Worked for 58s
Here are your four ad concepts:
Juice splashWellnessBotanicalCold brew - 02of 05
Video, polled until done
Turn ./kitchen.jpg into a 5-second video ad.
The agent uploads the photo, starts the video and polls picx job until it finishes.
Turn ./kitchen.jpg into a 5-second video ad.
picx upload ./kitchen.jpgpicx video "…"picx job gen_…Worked for 2m 14s
Your video ad is ready:
Image-to-video, 16:9Saved to your PicX assets - 03of 05
Edit local files
Put ./tee.jpg on a clean white background.
picx upload turns a local file into an HTTPS URL that picx image edit can use.
Put ./tee.jpg on a clean white background.
picx upload ./tee.jpgpicx image edit "…" --image-urls …Worked for 29s
Done — here's the edited tee:
Background replacedOriginal kept in your assets - 04of 05
Search the template library
Find a cozy café commercial template and make one for my coffee shop.
picx templates search finds a starting point from the PicX library.
Find a cozy café commercial template and make one for my coffee shop.
picx templates search "café commercial"picx video "…"Worked for 1m 51s
I used the best café template:
Template: Cozy Café CommercialReady in 16:9 - 05of 05
Check prices and balance
Which image model is cheapest, and how many credits do I have?
picx models lists live credit costs; picx balance shows what you have left.
Which image model is cheapest, and how many credits do I have?
picx modelspicx balanceWorked for 4s
Image models by price per 1K image:
Seedream 5 Lite — 16 creditsIdeogram 3.0 — 20 creditsNano Banana 2 Lite — 20 credits
Every command, with an example
Full reference in the CLI docs. Package: picx-cli on npm.
Images
picx image <prompt>COMMANDGenerate an image from a text prompt
Terminalpicx image "a sunset over mountains, oil painting style"picx image edit <instruction> --image-urls <urls>COMMANDEdit one or more existing images with an AI instruction
Terminalpicx image edit "make it nighttime with city lights" \ --image-urls https://cdn.picxstudio.com/api/generated/image.png
Video & jobs
picx video <prompt>COMMANDGenerate a video from a text prompt (text/image/reference mode)
Terminalpicx video "a drone shot flying over a coastline"picx job <id>COMMANDPoll a generation job's status and get the result URL when done
Terminalpicx job gen_abc123
Assets
picx upload <file>COMMANDUpload a local file to get an HTTPS URL for edit/video input
Terminalpicx upload ./photo.jpgpicx assets listCOMMANDList uploaded and generated assets in your account
picx assets rm <id>COMMANDDelete an asset by id
Terminalpicx assets rm asset_abc123
Models & templates
picx modelsCOMMANDList available models and their live credit costs
picx templates search <query>COMMANDSearch the PicX template library
Terminalpicx templates search "product photography"picx templates get <id>COMMANDGet a single template by id
Terminalpicx templates get tpl_abc123
Account
picx historyCOMMANDList your past generations, paginated
picx whoamiCOMMANDCheck API key authentication status and account identity
picx balanceCOMMANDShow current credit balance
picx usageCOMMANDShow API usage statistics
picx tierCOMMANDShow your account's current plan/tier
MCP
picx mcp install --client <claude|cursor>COMMANDInstall and configure the PicX MCP server for an MCP client
Terminalpicx mcp install --client claudepicx mcp doctorCOMMANDHealth-check the MCP connection and credentials
Recipes for content at scale
Copy a recipe, change the prompt, and run it.
Social Media Content
picx image --aspect-ratioRECIPEInstagram posts, YouTube thumbnails, Twitter banners — any size, any style.
Instagram post (square)picx image "minimal flat-lay coffee, aesthetic" \ --aspect-ratio 1:1 # YouTube thumbnail (wide) picx image "bold dramatic thumbnail" \ --aspect-ratio 16:9 --size 2K # Instagram story (vertical) picx image "behind the scenes shot" \ --aspect-ratio 9:16
Edit & Transform
picx upload → picx image editRECIPEChange backgrounds, seasons, styles, or fix lighting on any image.
Upload then editpicx upload ./selfie.jpg picx image edit "white studio backdrop, enhance" \ --image-urls <uploaded-url> # Style transfer picx image edit "anime art style, vibrant" \ --image-urls <uploaded-url> --size 2K # Batch: upload + edit a folder for f in ./photos/*.jpg; do url=$(picx upload "$f" --json | jq -r .url) picx image edit "vintage film grain" --image-urls "$url" done
CLI questions
How do I install the PicX CLI?
Run npm i -g picx-cli (Node 20 or later). The package is picx-cli on npm.
How do I sign in?
Create an API key on the API keys page, set it as PICX_API_KEY, then run picx whoami to check that it works.
Can AI agents use the CLI?
Yes. Every command supports --json for structured output, so any agent that can run a shell command can call picx. For Claude Desktop and Cursor, picx mcp install sets up the PicX MCP server in one step, and picx mcp doctor checks the connection.
What does it cost?
Generations use credits from your PicX balance — you pay only for what you generate, and failed generations are refunded automatically. Run picx models to see live credit costs.

Install once, create from anywhere
Your terminal, your scripts and your agents, all on one PicX credit balance.






