PixVerse CLI: AI Video and Image Generation for Developers
Learn how to install PixVerse CLI, generate your first AI image and video, and automate creative workflows inside Claude Code, Cursor, and AI agents.
PixVerse CLI: AI Video and Image Generation for Developers
Introduction
Every creative workflow has a bottleneck — the moment you have to leave your code editor, open a browser, and manually click through a web interface to generate a piece of media. For developers, AI agents, and anyone building automated content pipelines, that context switch is friction that adds up fast.
PixVerse CLI eliminates that bottleneck. It is the official command-line interface for PixVerse, giving you access to every model, every feature, and every capability from the PixVerse platform — directly from your terminal. Text-to-video, image-to-video, text-to-image, lip-sync speech, sound effects, upscaling — all scriptable, all pipeable, all available without touching a browser.
What makes PixVerse CLI particularly powerful is its design philosophy: it was built with AI agents in mind. Every command outputs structured JSON, every exit code is deterministic, and every pipeline step is composable. This means you can teach Claude Code, Cursor, Codex, or any other agent to generate images and videos on your behalf — and they will do it correctly, every time.
This guide walks you through the complete journey: from installation to your first generation, then into multi-step automation pipelines and agent-native workflows.
Prerequisites
Before starting, you need:
- Node.js 20 or higher — check with
node --version - A PixVerse account — sign up at pixverse.ai
- An active PixVerse subscription — the CLI uses the same credit system as the website; only subscribed users can generate content
PixVerse CLI does not require any API keys to be manually copied. Authentication is handled through a browser-based OAuth flow that stores your token locally.
Step 1: Install the CLI
Install globally with npm:
npm install -g pixverseVerify the installation:
pixverse --versionIf you prefer not to install globally, you can also run commands via npx:
npx pixverse create video --prompt "A cat walking on Mars"Step 2: Authenticate
Run the login command:
pixverse auth loginThe CLI will print a short URL and a code. Open the URL in your browser, enter the code, and authorize with your PixVerse account. Your token is stored automatically in ~/.pixverse/ and is valid for 30 days.
To verify you are logged in and check your available credits:
pixverse auth status
pixverse account infoThe account info command shows your subscription tier, remaining credits, and daily credit reset schedule. Always check your balance before running batch jobs.
Step 3: Generate Your First Image
Text-to-image generation is the fastest way to test your setup. Run:
pixverse create image --prompt "A photorealistic forest path at golden hour" --jsonThe --json flag returns structured output:
{
"image_id": 789012,
"status": "completed",
"image_url": "https://...",
"prompt": "A photorealistic forest path at golden hour",
"model": "qwen-image",
"width": 1024,
"height": 1024
}For higher resolution output, specify a model that supports it:
pixverse create image \
--prompt "A photorealistic forest path at golden hour" \
--model seedream-5.0-lite \
--quality 1800p \
--aspect-ratio 16:9 \
--jsonPixVerse supports several image models, each with different resolution ceilings and strengths:
| Model | Max Resolution | Best For |
|---|---|---|
qwen-image | 1080p | Fast generation, general use |
seedream-5.0-lite | 1800p | High-detail creative images |
seedream-4.5 | 2160p | Ultra-high resolution |
gemini-3.1-flash (Nano Banana 2) | 2160p | Wide resolution range, fast |
gemini-3.0 (Nano Banana Pro) | 2160p | High quality at scale |
gemini-2.5-flash (Nano Banana) | 1080p | Lightweight, fast turnaround |
To download the generated image:
pixverse asset download 789012Step 4: Generate Your First Video
Text-to-video works the same way. Generate a 5-second clip:
pixverse create video --prompt "A sunset over ocean waves" --jsonFor a fully customized generation:
pixverse create video \
--prompt "A cinematic drone shot over a misty mountain valley at dawn" \
--model v5.6 \
--quality 1080p \
--aspect-ratio 16:9 \
--duration 8 \
--audio \
--jsonThe --audio flag enables AI-generated ambient sound that matches your video content. The --json flag returns a video_url on completion that you can pass directly to a download command or the next step in a pipeline.
PixVerse provides multiple video models with different capabilities:
| Model | Max Quality | Duration Range | Notes |
|---|---|---|---|
v5.6 | 1080p | 1–10 sec | Most flexible; widest duration range |
sora-2-pro | 1080p | 4, 8, 12 sec | High-quality cinematic output |
veo-3.1-standard | 1080p | 4, 6, 8 sec | Supports Transition mode |
grok-imagine | 720p | 1–15 sec | Longest max duration |
Animate a Static Image
To turn a photo or generated image into a video, provide the --image flag:
pixverse create video \
--prompt "Gentle wind moves through the scene" \
--image ./product-photo.jpg \
--model v5.6 \
--quality 1080p \
--jsonYou can pass a local file path or a URL. Local files are uploaded automatically — no manual upload step required.
Step 5: Run the Interactive Wizard
If you are exploring for the first time and are not yet familiar with all the available flags, run any creation command without arguments to enter the guided wizard:
pixverse create video
pixverse create imageThe wizard walks you through prompt, model selection, quality, aspect ratio, duration, and other options step by step — useful for discovering what parameters are available before scripting them.
Teaching Your AI Agent to Generate Media
This is where PixVerse CLI becomes genuinely transformative. Because every command returns structured JSON and uses deterministic exit codes, any AI agent that can run shell commands can be taught to generate images and videos on demand.
Installing PixVerse Skills
PixVerse Skills is a library of structured skill files that teaches agents exactly how to use the CLI: which flags each command accepts, which models support which parameters, how to chain commands into pipelines, and how to handle errors.
For Claude Code and other agents that support the skills format, add the PixVerse skills directly:
npx skills add https://github.com/pixverseai/skills --skill pixverse-ai-image-and-video-generatorFor Cursor, the skills live at skills/ in the PixVerse Skills GitHub repository and can be loaded as context directly into your editor. For Codex and LangChain-based agents, each skill file is self-contained markdown that can be injected into the agent’s system prompt.
Once your agent has the PixVerse skills loaded, you can give it natural-language instructions like:
- “Generate a 10-second product demo video from this screenshot”
- “Create four variations of this blog cover image in 16:9 format”
- “Animate this diagram into a 5-second explainer clip with ambient sound”
The agent will translate those instructions into the correct CLI commands, parse the JSON output, and handle polling and downloads — no manual intervention required.
Claude Code
In Claude Code, PixVerse CLI becomes a native tool the agent uses autonomously. After loading the PixVerse skills, you can include media generation directly in any task:
Generate a cover image for this blog post about machine learning,
use the seedream-5.0-lite model at 1800p in 16:9 format,
download it to ./assets/cover.webp
Claude Code will invoke the correct CLI commands, parse the image URL from the JSON response, and download the file to your specified path — all within the same session where it is also writing your code.
A typical Claude Code workflow:
# Claude Code runs this autonomously based on your instruction
IMG=$(pixverse create image \
--prompt "Abstract visualization of neural network layers, dark background, blue and purple tones" \
--model seedream-5.0-lite \
--quality 1800p \
--aspect-ratio 16:9 \
--json | jq -r '.image_url')
# Then animates it
pixverse create video \
--prompt "Slow pan across glowing neural connections" \
--image "$IMG" \
--model v5.6 \
--quality 1080p \
--duration 6 \
--jsonCursor
Cursor users can load PixVerse Skills as a project context file. Place the relevant skill files in your .cursor/ directory or add them to your workspace rules. Once loaded, Cursor has full awareness of every PixVerse CLI command and can generate media as part of any coding task.
A common Cursor workflow: ask the agent to generate a mockup image based on a design you are building, then use it as a reference directly in your IDE session — without ever leaving the editor.
Codex and Other Agents
PixVerse CLI is compatible with any agent that can execute shell commands and parse JSON. The structured output format — consistent field names, predictable error codes, and stderr-separated error messages — ensures that even simple scripting agents can integrate generation reliably.
The exit code contract makes error handling straightforward:
| Code | Meaning | Agent Action |
|---|---|---|
| 0 | Success | Parse JSON output |
| 2 | Timeout | Retry with longer --timeout |
| 3 | Auth expired | Re-run pixverse auth login |
| 4 | Out of credits | Check balance, notify user |
| 5 | Generation failed | Try different parameters |
| 6 | Validation error | Review flag values |
Automation Pipelines
Once you understand the individual commands, PixVerse CLI unlocks powerful multi-step workflows that run entirely without user interaction.
Text to Image to Video
One of the most useful pipelines: generate a high-resolution image from a text prompt, then animate it into a video.
# Step 1: Generate a base image
IMG_RESULT=$(pixverse create image \
--prompt "A cyberpunk cityscape at night, neon lights reflecting on wet pavement" \
--model gemini-3.1-flash \
--quality 2160p \
--aspect-ratio 16:9 \
--json)
IMAGE_URL=$(echo "$IMG_RESULT" | jq -r '.image_url')
# Step 2: Animate it into a video
VID_RESULT=$(pixverse create video \
--prompt "Camera slowly pans across the neon-lit streets" \
--image "$IMAGE_URL" \
--model v5.6 \
--quality 1080p \
--duration 8 \
--json)
VIDEO_ID=$(echo "$VID_RESULT" | jq -r '.video_id')
# Step 3: Download the final video
pixverse asset download "$VIDEO_ID" --jsonFull Video Production Pipeline
For polished output, chain creation with post-processing steps:
# Step 1: Create the base video
RESULT=$(pixverse create video \
--prompt "A product being assembled in slow motion" \
--model v5.6 \
--quality 720p \
--duration 5 \
--json)
VID=$(echo "$RESULT" | jq -r '.video_id')
# Step 2: Extend duration
EXTENDED=$(pixverse create extend \
--video "$VID" \
--prompt "Continue the assembly sequence" \
--duration 5 \
--json | jq -r '.video_id')
pixverse task wait "$EXTENDED" --json
# Step 3: Add ambient sound
WITH_SOUND=$(pixverse create sound \
--video "$EXTENDED" \
--prompt "Industrial workshop ambience, soft mechanical sounds" \
--json | jq -r '.video_id')
pixverse task wait "$WITH_SOUND" --json
# Step 4: Upscale to 1080p
FINAL=$(pixverse create upscale \
--video "$WITH_SOUND" \
--quality 1080p \
--json | jq -r '.video_id')
pixverse task wait "$FINAL" --json
# Step 5: Download
pixverse asset download "$FINAL" --jsonBatch Generation
For content pipelines that require multiple variations, run jobs in parallel:
# Check credits first
CREDITS=$(pixverse account info --json | jq -r '.credits.total')
echo "Available credits: $CREDITS"
# Submit four parallel generations
pixverse create video --prompt "Sunrise over mountains" --no-wait --json > /tmp/v1.json &
pixverse create video --prompt "Sunset over ocean" --no-wait --json > /tmp/v2.json &
pixverse create video --prompt "Stars over a desert" --no-wait --json > /tmp/v3.json &
pixverse create video --prompt "Aurora over a frozen lake" --no-wait --json > /tmp/v4.json &
wait
# Wait for each and download
for f in /tmp/v1.json /tmp/v2.json /tmp/v3.json /tmp/v4.json; do
ID=$(jq -r '.video_id' "$f")
pixverse task wait "$ID" --json
pixverse asset download "$ID" --json
doneThe --no-wait flag submits the job and returns immediately with a task ID, allowing you to submit multiple jobs before polling. The pixverse task wait command handles the adaptive polling for you — no manual sleep loops required.
Configuring Defaults
If you consistently use the same model, quality, or aspect ratio, set them as defaults so you do not have to repeat flags every time:
pixverse config defaults set --mode video --model v5.6 --quality 1080p --aspect-ratio 16:9
pixverse config defaults set --mode image --model seedream-5.0-lite --quality 1800p
pixverse config set output-dir ~/Downloads/pixverseCommand-line flags always override your configured defaults, so you retain full flexibility while reducing repetition.
What You Can Build
With PixVerse CLI integrated into your agent workflow, the range of automatable tasks expands considerably:
- Documentation — auto-generate product demo videos and screenshots as part of your doc build process
- Marketing — run nightly batch jobs that produce social media content variations from a single prompt library
- App development — let your coding agent generate placeholder visuals, mockup animations, or loading screen videos while you build the UI
- Content pipelines — chain CLI calls with other tools (ffmpeg, ImageMagick, cloud storage) to build fully automated media production workflows
- Prototyping — generate quick motion concepts in seconds to validate ideas before committing to full production
The CLI is designed to fit naturally into any shell-based workflow. If your existing automation runs in bash, Python, Node, or a CI/CD pipeline, PixVerse CLI slots in without any additional integration overhead.
Getting Started Checklist
- Install Node.js 20 or higher
- Run
npm install -g pixverse - Run
pixverse auth loginand authorize in browser - Run
pixverse account infoto verify credits - Generate your first image:
pixverse create image --prompt "..." --json - Generate your first video:
pixverse create video --prompt "..." --json - Install PixVerse Skills for your agent (Claude Code, Cursor, or Codex)
- Set up your preferred defaults with
pixverse config defaults set - Build your first automation pipeline
Next Steps
The PixVerse CLI on npm (npm install -g pixverse) gives you immediate access to all generation capabilities. The PixVerse Skills repository provides the structured skill files that teach your AI agent how to use those capabilities correctly in any context.
The combination of a reliable CLI and an agent-ready skill library means that image and video generation can now live inside the same workflow as your code — managed by the same agent, in the same terminal, without switching tools.
Start with a single command. Build from there.