Skip to main content

Global flags

These flags are available on every command:
FlagDescriptionDefault
--jsonOutput in JSON format (recommended for AI agents)false
--timeoutRequest timeout10m

Commands

auth

Manage authentication and credentials.
SubcommandDescription
auth loginLog in with a browser session (OAuth)
auth logoutRemove the stored session
auth statusShow current user, org, and environment
You can also authenticate by setting the PIXA_API_KEY environment variable.

run

Run tools, prompts, and pipelines. This is the primary entrypoint for agents. pixa run has subcommands for each mode of execution:

run prompt

Submit a natural-language prompt to Pixa’s AI agent. The agent analyzes your request and selects the appropriate tools.
pixa run prompt "remove the background from this photo" \
  --attachment photo.png --json
Flags:
FlagDescription
--attachmentAttach a file, URL, or asset ID (repeatable)
--modelModel ID for generation (e.g., nano-banana-2)
--aspect-ratioAspect ratio (e.g., 16:9, 1:1)
--output-formatOutput format: png, jpg, or webp
--num-variationsNumber of variations to generate
--brand-libraryBrand library ID for brand-consistent generation
--asyncReturn immediately with job ID
--dry-runValidate without executing
--skip-saveDon’t save results to the workspace
--collection-idSave results to a specific collection
--outputDownload result to this file path
JSON input (via flag or stdin):
pixa run prompt --json-input '{
  "message": "remove the background",
  "attachments": [{"url": "https://example.com/photo.png"}]
}' --json
echo '{
  "message": "remove the background",
  "attachments": [{"url": "photo.png"}],
  "generation_settings": {
    "model_id": "nano-banana-2",
    "aspect_ratio": "16:9",
    "output_format": "png",
    "num_variations": 2,
    "brand_library_id": "<library-id>"
  }
}' | pixa run prompt --json

run pipeline

Run a saved pipeline by ID.
pixa run pipeline pl_abc123 \
  --input photo=./product.png \
  --input prompt="white background" \
  --json
Flags:
FlagDescription
--inputNode input as name=value (repeatable; value is file path, URL, asset ID, or text)
--asyncReturn immediately with job ID
--dry-runValidate without executing
--collection-idSave results to a specific collection

run remove-bg

Remove background from an image.
pixa run remove-bg product.png --json

run upscale

Upscale an image to higher resolution.
pixa run upscale product.png --scale 4 --json
FlagDescriptionDefault
--scaleScale factor (2 or 4)2

run expand

Extend an image with AI-generated content.
pixa run expand product.png --right 200 --bottom 100 --json
FlagDescriptionDefault
--leftPixels to add on the left0
--rightPixels to add on the right0
--topPixels to add on the top0
--bottomPixels to add on the bottom0

run model

Generate images or video with an AI model.
pixa run model "a product photo on white background" \
  --model nano-banana-2 --aspect-ratio 1:1 --json
FlagDescriptionDefault
--modelModel ID (run pixa models to browse)
--aspect-ratioAspect ratio (e.g., 16:9, 1:1)
--output-formatOutput format: png, jpg, or webppng
--num-variationsNumber of variations to generate1
All run subcommands also accept --async, --dry-run, --skip-save, --collection-id, --output, --set key=value, and --attachment name=value.

jobs

Inspect and manage long-running operations.
SubcommandDescription
jobs get <id>Get job status and results
jobs follow <id>Poll until completion (--interval to set polling frequency, default 2s)
jobs cancel <id>Cancel a running job

models

Browse available AI models.
SubcommandDescription
models listList all available models (--limit for pagination)
models search <query>Search by name or capability
models get <id>Get model details

assets

Manage media assets.
SubcommandDescription
assets listList assets (--limit, --after, --collection, --tag, --status)
assets upload <file_or_url>Upload a local file or import from a URL (--collection to target)
assets get <asset_id>Get asset metadata
assets search <query>Search assets by keyword or semantic similarity (--limit)
assets download <asset_id>Download an asset to a local file
assets delete <asset_id>...Delete one or more assets
assets move <asset_id>... <collection_id>Move assets to a collection
assets tag <asset_id> <tags>...Add tags to an asset
assets untag <asset_id> <tags>...Remove tags from an asset

collections

Organize assets into groups.
SubcommandDescription
collections listList all collections
collections get <id>Get a collection by ID
collections create [name]Create a new collection
collections search <query>Search collections by name
collections delete <id>Delete a collection

pipelines

Manage saved reusable workflows.
SubcommandDescription
pipelines listList all pipelines (--limit, --after)
pipelines get <id>Get pipeline details (nodes, edges)
pipelines createCreate a new pipeline (--name required)
pipelines update <id>Update a pipeline
pipelines search <query>Search pipelines by name
pipelines delete <id>Delete a pipeline
pipelines runs <id>List past runs of a pipeline
pipelines node-typesList available node types

brands

Manage brand libraries and identities.
SubcommandDescription
brands listList all brand libraries with identity details
brands get <id>Get a brand library’s details
brands createCreate a new brand library (--name required, --website, --tagline, --description optional)
brands delete <id>Delete a brand library

personas

Manage AI personas for content generation.
SubcommandDescription
personas listList all personas (--brand to filter by brand library)
personas get <id>Get persona details
personas createCreate a new persona (--brand, --name required)
Create and manage shareable links to asset selections.
SubcommandDescription
share-links listList all share links
share-links get <id>Get a share link by ID
share-links createCreate a new share link (--name required, --asset or --collection to include)
share-links contents <id>List assets in a share link
share-links update <id>Modify a share link (--add-asset, --remove-asset)
share-links delete <id>Delete a share link

tags

Manage organization-wide media labels.
SubcommandDescription
tags listList all tags
tags delete <name>Delete a tag

usage

View credits and usage history.
SubcommandDescription
usage creditsShow current credit balance and next refill date
usage historyView past credit transactions (--limit, --after)

update

Upgrade pixa to the latest version.
pixa update