PicX Studio

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
  1. Step 1

    Install

    From npm, on Node 20 or later.

    npm i -g picx-cli
  2. 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
  3. Step 3

    Generate

    Every command speaks --json.

    picx image "a sunset over mountains, oil painting style"
MCPPrefer a direct connection? Use the MCP server
See what it can do

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>COMMAND

Generate an image from a text prompt

Try it now
picx — zsh

$ picx image "mango juice splash ad, warm orange studio" --size 2K

{ "images": [{ "url": "https://cdn.picxstudio.com/…", "size": "2K" }],

"credits_used": 53 }

Nano Banana Pro
2K

Your agent runs the commands

Any agent that can run a shell command can use PicX. Copy a prompt to try it.

  1. 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 ×4

    Worked for 58s

    Here are your four ad concepts:

    Juice splash
    Wellness
    Botanical
    Cold brew
  2. 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:9
    Saved to your PicX assets
  3. 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 replaced
    Original kept in your assets
  4. 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é Commercial
    Ready in 16:9
  5. 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 balance

    Worked for 4s

    Image models by price per 1K image:

    Seedream 5 Lite — 16 credits
    Ideogram 3.0 — 20 credits
    Nano 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>COMMAND

    Generate an image from a text prompt

    Terminal
    picx image "a sunset over mountains, oil painting style"
  • picx image edit <instruction> --image-urls <urls>COMMAND

    Edit one or more existing images with an AI instruction

    Terminal
    picx image edit "make it nighttime with city lights" \
      --image-urls https://cdn.picxstudio.com/api/generated/image.png

Video & jobs

  • picx video <prompt>COMMAND

    Generate a video from a text prompt (text/image/reference mode)

    Terminal
    picx video "a drone shot flying over a coastline"
  • picx job <id>COMMAND

    Poll a generation job's status and get the result URL when done

    Terminal
    picx job gen_abc123

Assets

  • picx upload <file>COMMAND

    Upload a local file to get an HTTPS URL for edit/video input

    Terminal
    picx upload ./photo.jpg
  • picx assets listCOMMAND

    List uploaded and generated assets in your account

  • picx assets rm <id>COMMAND

    Delete an asset by id

    Terminal
    picx assets rm asset_abc123

Models & templates

  • picx modelsCOMMAND

    List available models and their live credit costs

  • picx templates search <query>COMMAND

    Search the PicX template library

    Terminal
    picx templates search "product photography"
  • picx templates get <id>COMMAND

    Get a single template by id

    Terminal
    picx templates get tpl_abc123

Account

  • picx historyCOMMAND

    List your past generations, paginated

  • picx whoamiCOMMAND

    Check API key authentication status and account identity

  • picx balanceCOMMAND

    Show current credit balance

  • picx usageCOMMAND

    Show API usage statistics

  • picx tierCOMMAND

    Show your account's current plan/tier

MCP

  • picx mcp install --client <claude|cursor>COMMAND

    Install and configure the PicX MCP server for an MCP client

    Terminal
    picx mcp install --client claude
  • picx mcp doctorCOMMAND

    Health-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-ratioRECIPE

    Instagram 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 editRECIPE

    Change backgrounds, seasons, styles, or fix lighting on any image.

    Upload then edit
    picx 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

Every image model, one command away

Run picx models for the live credit cost of each one.

View all
  • Nano Banana Pro example
    Nano Banana Pro

    Nano Banana Pro

    Highest quality stills, best for final listing images.

  • GPT Image 2 example
    GPT Image 2

    GPT Image 2

    Strong text rendering and realism for ads with copy.

  • Nano Banana 2 example
    Nano Banana 2

    Nano Banana 2

    Fast, sharp variations for testing many angles.

Every video model, one command away

Text, image or reference-driven video, with job polling.

View all
  • Seedance 2.5 example
    Seedance 2.5

    Seedance 2.5

    Native 30s single takes from text, image or references.

  • Kling 3.0 Pro example
    Kling 3.0 Pro

    Kling 3.0 Pro

    Image-to-video with motion control at 1080p.

  • MiniMax H3 example
    MiniMax H3

    MiniMax H3

    Trending cinematic model for hero product shots.

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.