pixverse-ai-image-and-video-generator
Original:🇺🇸 English
Translated
PixVerse CLI — generate AI videos and images from the command line. Supports PixVerse, Veo, Sora, Kling, Hailuo, Wan, and more video models; Nano Banana (Gemini), Seedream, Qwen image models; and PixVerse's rich effect template library. Start here.
4installs
Sourcepixverseai/skills
Added on
NPX Install
npx skill4agent add pixverseai/skills pixverse-ai-image-and-video-generatorTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →PixVerse CLI — Master Skill
What is PixVerse CLI
PixVerse CLI is the official command-line interface for PixVerse — an AI-powered creative platform for generating videos and images. It is essentially a UI-free version of the PixVerse website: all features, models, and parameters are aligned with the web experience at app.pixverse.ai.
It is designed for:
- AI agents (primary) — structured JSON output, deterministic exit codes, and pipeable commands for autonomous workflows (Claude Code, Cursor, Codex, custom agents)
- Developers & power users — scriptable video/image generation without leaving the terminal
- Automation — batch processing, CI/CD pipelines, content production workflows
Key facts:
- Generating content consumes credits from the user's PixVerse account (same pricing as the website)
- Only subscribed users can use the CLI — see subscription plans
- All output can be returned as structured JSON via flag
--json - English only
Installation
bash
npm install -g pixverseOr run without installing:
bash
npx pixverseVerify:
bash
pixverse --versionRequires Node.js >= 20.
Quick Start
bash
# 1. Install
npm install -g pixverse
# 2. Authenticate (OAuth device flow — opens browser)
pixverse auth login --json
# 3. Create a video (waits for completion by default)
RESULT=$(pixverse create video --prompt "A cat astronaut floating in space" --json)
VIDEO_ID=$(echo "$RESULT" | jq -r '.video_id')
# 4. Download the result
pixverse asset download $VIDEO_ID --jsonTo skip waiting and poll later:
bash
RESULT=$(pixverse create video --prompt "A cat astronaut floating in space" --no-wait --json)
VIDEO_ID=$(echo "$RESULT" | jq -r '.video_id')
pixverse task wait $VIDEO_ID --json
pixverse asset download $VIDEO_ID --jsonAuthentication
PixVerse CLI uses OAuth device flow — no need to manually copy tokens:
- Run
pixverse auth login --json - The CLI prints an authorization URL
- Open the URL in your browser and authorize
- The token is stored automatically in
~/.pixverse/
Details:
- Token is valid for 30 days
- CLI sessions are independent from your web/app sessions
- If token expires (exit code 3), re-run
pixverse auth login --json - Set environment variable to override the stored token
PIXVERSE_TOKEN - Run to check login state and credits
pixverse auth status --json
Capabilities Overview
| I want to... | Use skill |
|---|---|
| Create a video from text or image | |
| Create or edit an image | |
| Extend, upscale, or add audio to a video | |
| Create transition animation between frames | |
| Check generation progress | |
| Browse, download, or delete assets | |
| Set up auth or check account | |
| Browse and create from effect templates | |
Looking up models or parameters? Don't wait until you're generating — read the relevant capabilities file directly:
- Video models & constraints →
(Model Reference section)skills/capabilities/create-video.md- Image models & constraints →
(Model Reference section)skills/capabilities/create-and-edit-image.md
Model Quick Reference
Use this to pick a model before diving into a sub-skill.
Video Models (pixverse create video --model <value>
)
pixverse create video --model <value>| Model | | Max Quality | Duration |
|---|---|---|---|
| PixVerse v5.6 (default) | | | |
| Sora 2 | | | |
| Sora 2 Pro | | | |
| Veo 3.1 Standard | | | |
| Veo 3.1 Fast | | | |
| Grok Imagine | | | |
Image Models (pixverse create image --model <value>
)
pixverse create image --model <value>| Model | | Max Quality |
|---|---|---|
| Qwen Image (default) | | |
| Seedream 5.0 Lite | | |
| Seedream 4.5 | | |
| Seedream 4.0 | | |
| Gemini 2.5 Flash (Nanobanana) | | |
| Gemini 3.0 (Nano Banana Pro) | | |
| Gemini 3.1 Flash (Nano Banana 2) | | |
For full parameter constraints (aspect ratios, quality per model, mode support), read the capabilities files listed above.
Workflow Skills
| I want to... | Use skill |
|---|---|
| Generate video from text end-to-end | |
| Animate an image into video | |
| Generate image then animate it | |
| Iteratively edit an image | |
| Full video production (create + extend + audio + upscale) | |
| Create multiple items in parallel | |
All Commands
| Command | Description |
|---|---|
| Login via browser (OAuth device flow) |
| Check authentication status |
| Remove stored token |
| Text-to-video or image-to-video |
| Text-to-image or image-to-image |
| Create transitions between keyframes |
| Add lip-sync speech to video |
| Add AI sound effects to video |
| Extend video duration |
| Upscale video resolution |
| Generate video with character references |
| Create video or image from an effect template |
| List template categories |
| Browse templates (with optional category filter) |
| Search templates by keyword |
| Get template details |
| Check task status |
| Wait for task completion |
| List generated assets |
| Get asset details |
| Download a generated asset |
| Delete an asset |
| View account info and credits |
| View credit usage records |
| Open subscription page in browser |
| List all config values |
| Get a config value |
| Set a config value |
| Reset config to defaults |
| Show config file path |
| Manage per-mode creation defaults |
Global Flags
| Flag | Description |
|---|---|
| Pure JSON output to stdout (required for agent use) |
| Show CLI version |
| Show help for any command |
Every command supports . All examples in skills use for machine-readable output.
--json--jsonInteractive mode: Run any creation command without arguments (and without ) to enter the interactive wizard.
--jsonOutput Contract
JSON mode (--json
)
--json- stdout: Pure JSON only. No spinners, no progress text, no decorative output.
- stderr: All errors, warnings, and diagnostic messages.
- Parse stdout with or any JSON parser.
jq
Exit Codes
| Code | Name | Meaning | Recovery |
|---|---|---|---|
| 0 | SUCCESS | Completed | — |
| 1 | GENERAL_ERROR | Unexpected error | Check stderr for details |
| 2 | TIMEOUT | Polling timed out | Increase |
| 3 | AUTH_EXPIRED | Token invalid/expired | Re-run |
| 4 | CREDIT_INSUFFICIENT | Not enough credits | Check |
| 5 | GENERATION_FAILED | Generation failed/rejected | Check prompt, try different parameters |
| 6 | VALIDATION_ERROR | Invalid parameters | Check flag values against enums in each skill |
Error handling pattern
bash
RESULT=$(pixverse create video --prompt "A sunset over mountains" --json 2>/tmp/pv_err)
EXIT_CODE=$?
if [ $EXIT_CODE -eq 0 ]; then
VIDEO_ID=$(echo "$RESULT" | jq -r '.video_id')
echo "Success: $VIDEO_ID"
pixverse asset download $VIDEO_ID --json
elif [ $EXIT_CODE -eq 3 ]; then
echo "Token expired, re-authenticating..."
pixverse auth login --json
elif [ $EXIT_CODE -eq 4 ]; then
echo "Not enough credits"
pixverse account info --json | jq '.credits'
elif [ $EXIT_CODE -eq 5 ]; then
echo "Generation failed — check prompt or parameters"
cat /tmp/pv_err
else
echo "Error (code $EXIT_CODE)"
cat /tmp/pv_err
fi