WaveSpeed CLI

WaveSpeed CLI

Use WaveSpeed CLI to run WaveSpeedAI models from your terminal. The CLI gives image, video, audio, 3D, and other model workflows the same basic entry point:

# Run a WaveSpeedAI model and return machine-readable JSON.
wavespeed run <model_id> --json

It is useful when you want to generate assets manually, automate model calls from scripts or CI jobs, or let coding agents such as Codex, Claude Code, Cursor, and similar tools call WaveSpeedAI from the terminal.

Visit the WaveSpeed CLI page for the product overview and installation entry point.

Install

With Node.js 18 or later:

# Install the CLI globally with npm.
npm install -g @wavespeed/cli
 
# Confirm the installed CLI version.
wavespeed --version

No Node.js? macOS and Linux can install a standalone executable instead:

# Download the installer, then run it. It downloads the executable for your platform,
# verifies its checksum, and installs it to ~/.local/bin.
curl --fail-with-body -sSL -o install.sh https://raw.githubusercontent.com/WaveSpeedAI/wavespeed-cli/main/install.sh
bash install.sh

On Windows, download wavespeed-windows-x64.exe from the latest release, rename it to wavespeed.exe, and put it in a folder on your PATH. The executable is not code-signed yet, so Windows SmartScreen may show a warning the first time you run it.

Upgrade

# Upgrade to the latest version.
wavespeed upgrade
 
# Only check whether a newer version exists.
wavespeed upgrade --check

wavespeed upgrade follows how you installed the CLI: an npm install is reinstalled with npm, and a standalone executable is replaced with the latest release after its checksum is verified. If another wavespeed is also on your PATH, the command tells you, because the one that comes first is the one that runs. Add --json for machine-readable output.

After upgrading, run wavespeed skill install again in any project where you installed the agent skill, so the skill file matches the new version.

Sign In

Use interactive login when you are working locally:

# Start the browser-based login flow.
wavespeed login
 
# Confirm the active account, API base URL, and local key location.
wavespeed status

Use non-interactive login for remote machines or automation:

# Store an API key on this machine without opening a browser.
wavespeed login --api-key <API_KEY> --no-browser
 
# Confirm the CLI is signed in before running jobs.
wavespeed status

To remove the stored API key from the machine:

# Clear the locally stored API key.
wavespeed logout

Keep API keys out of git, README files, frontend code, and shared logs. The CLI stores the key in local user configuration after login.

Most CLI tasks follow this order:

models -> schema -> price -> run -> download or history

For example:

# Search for a model related to z-image.
wavespeed models z-image
 
# Inspect the inputs accepted by the selected model.
wavespeed schema wavespeed-ai/z-image/turbo
 
# Estimate the price before generating output.
wavespeed price wavespeed-ai/z-image/turbo -p "a product photo" -i size=1024*1024
 
# Run the model and print a JSON response.
wavespeed run wavespeed-ai/z-image/turbo -p "a product photo" -i size=1024*1024 --json
 
# Run the model and download generated outputs locally.
wavespeed run wavespeed-ai/z-image/turbo -p "a product photo" -i size=1024*1024 --json --download

Search Models

Use models to browse the WaveSpeedAI model catalog. Start broad, then narrow by keyword, popularity, or model type.

# List models from the catalog.
wavespeed models
 
# Search models that match a keyword or model family.
wavespeed models z-image
 
# Search for video-related models.
wavespeed models video
 
# Search for LoRA-related models.
wavespeed models lora
 
# Show popular models across the catalog.
wavespeed models --popular
 
# Show popular models that match a keyword.
wavespeed models z-image --popular
 
# Filter to text-to-image models.
wavespeed models --type text-to-image
 
# Filter to image-to-video models.
wavespeed models --type image-to-video
 
# Filter to text-to-video models.
wavespeed models --type text-to-video
 
# Filter to image-to-image models.
wavespeed models --type image-to-image
 
# Use category as an alias for type.
wavespeed models --category text-to-image
 
# Refresh the local model cache from the live catalog.
wavespeed models --refresh
 
# Skip the local cache for this command.
wavespeed models --no-cache
 
# Return matching models as JSON for scripts and agents.
wavespeed models z-image --json

Use --json when another program needs to parse the model list. Use --refresh or --no-cache when you want to confirm the latest catalog data.

Inspect Model Inputs

Use schema before running an unfamiliar model:

# Show the required and optional inputs for a model.
wavespeed schema <model_id>
 
# Return the model schema as JSON.
wavespeed schema <model_id> --json
 
# Fetch a fresh schema instead of using the local cache.
wavespeed schema <model_id> --refresh

You can also inspect runnable flags for a model:

# Show model-specific run help and accepted flags.
wavespeed run <model_id> -h

For example:

# Inspect the z-image turbo input schema.
wavespeed schema wavespeed-ai/z-image/turbo

The schema shows required and optional inputs such as prompt, size, seed, output_format, image URLs, video settings, or other model-specific fields.

Run a Model

The simplest run uses a model ID and a prompt:

# Run a text-to-image prompt and return JSON.
wavespeed run wavespeed-ai/z-image/turbo -p "a cyberpunk skyline" -i size=1024*1024 --json

Pass model-specific inputs with -i:

# Run z-image turbo with explicit size, JSON output, and local download.
wavespeed run wavespeed-ai/z-image/turbo \
  -p "a clean product photo of a glass teapot" \
  -i size=1024*1024 \
  --json \
  --download

The multi-line examples use Bash line continuations (\). On Windows PowerShell, run the command on one line or replace each \ with a PowerShell backtick. In PowerShell, the backtick must be the last character on the line.

Common run options:

OptionUse
-p, --prompt <text>Shortcut for prompt=<text>
-i, --input key=valuePass one model input; repeat it for multiple inputs
--input-file <path>Pass a full JSON input object from a file
--jsonEmit one JSON object on stdout for scripts and agents
--downloadDownload generated outputs to the default output directory
--download "./out/{index}.{ext}"Download with a path template
--output-dir <dir>Set the download directory for this run
--syncUse sync mode (works with every model); may return a timeout error if the task is still processing after the sync wait window

For scripts and AI agents, prefer --json so the caller can parse the result reliably. Add --download when local files are needed.

When --sync times out, the prediction continues processing. In JSON mode, use the returned prediction ID or result URL to query the task later.

Upload Files

Image-to-image, image editing, image-to-video, and similar models often require a hosted file URL. Upload local files first:

# Upload one local file and print the CDN URL.
wavespeed upload ./input.png
 
# Upload one local file and return JSON.
wavespeed upload ./input.png --json

Upload multiple files:

# Upload multiple files in one command and return JSON.
wavespeed upload ./a.png ./b.png --json

Then pass the returned CDN URL to a model input:

# Use an uploaded image URL as model input.
wavespeed run <model_id> -i image="<url>" -p "animate this image" --json

Download Results

Use download when you already have output URLs:

# Download one remote output URL to the default output directory.
wavespeed download <url>
 
# Download one remote output URL and return JSON.
wavespeed download <url> --json
 
# Download one remote output URL to a specific file path.
wavespeed download <url> -o ./output.png
 
# Download multiple output URLs into one directory.
wavespeed download <url1> <url2> --output-dir ./outputs

Price and Balance

Check your account balance:

# Show the current account balance.
wavespeed balance
 
# Return balance details as JSON.
wavespeed balance --json
 
# Show balance and open the top-up flow when needed.
wavespeed balance --top-up

Estimate the cost of a run before generating:

# Estimate cost with prompt shorthand.
wavespeed price wavespeed-ai/z-image/turbo -p "a product photo" -i size=1024*1024
 
# Estimate cost with explicit input syntax and JSON output.
wavespeed price wavespeed-ai/z-image/turbo -i prompt="a product photo" -i size=1024*1024 --json

price calculates the estimated cost for the given inputs. It does not generate output and does not charge for a prediction.

Open or print the top-up page:

# Open the top-up page in a browser.
wavespeed top-up
 
# Print the top-up URL instead of opening a browser.
wavespeed top-up --print

History

List recent predictions:

# List recent predictions.
wavespeed history
 
# List the first 10 recent predictions.
wavespeed history --limit 10
 
# List page 2 with 20 predictions per page.
wavespeed history --page 2 --limit 20
 
# Show history for one model.
wavespeed history --model wavespeed-ai/z-image/turbo
 
# Show only completed predictions.
wavespeed history --status completed
 
# Show predictions created in a time range (ISO 8601 or YYYY-MM-DD).
wavespeed history --since 2026-10-01 --until 2026-10-08
 
# Return history as JSON.
wavespeed history --json

Show one prediction:

# Show full details for one prediction.
wavespeed show <prediction_id>
 
# Return prediction details as JSON.
wavespeed show <prediction_id> --json
 
# Show the prediction and download its outputs.
wavespeed show <prediction_id> --download

Delete predictions:

# Delete one prediction from history.
wavespeed delete <prediction_id>
 
# Delete multiple predictions without an interactive confirmation.
wavespeed delete <id1> <id2> -y
 
# Delete one prediction and return JSON.
wavespeed delete <prediction_id> --json

Billing and Usage

List itemized charges and refunds, and see what you spent. Both commands need an API key with Billing access.

# List recent charges and refunds.
wavespeed billings
 
# Only refunds, or only charges.
wavespeed billings --type refund
wavespeed billings --type deduct
 
# Charges for one model or one API key (use the uuid), in a time range.
wavespeed billings --model <model_uuid> --key <api_key_uuid> --since 2026-10-01 --until 2026-10-08
 
# Page through the records, or return them as JSON.
wavespeed billings --page 2 --limit 50
wavespeed billings --json
 
# Spend, request counts and a per-model breakdown (the last 7 days by default).
wavespeed usage
wavespeed usage --since 2026-10-01 --until 2026-10-08 --model <model_uuid> --json

Project Configuration

Initialize a project configuration file:

# Create wavespeed.json with sensible defaults.
wavespeed init -y

This creates wavespeed.json:

{
  "$schema": "https://wavespeed.ai/schema/cli.json",
  "defaultModel": "google/nano-banana-2/text-to-image",
  "outputDir": "wavespeed-output",
  "aliases": {}
}

With defaultModel, you can omit the model ID:

# Run the configured default model.
wavespeed run -p "a product photo" --json --download

Use aliases to share repeatable model settings with a team:

{
  "defaultModel": "google/nano-banana-2/text-to-image",
  "outputDir": "wavespeed-output",
  "aliases": {
    "hero": {
      "model": "wavespeed-ai/z-image/turbo",
      "input": {
        "size": "1024*1024"
      }
    }
  }
}

Then run the alias:

# Run the hero alias with a custom prompt.
wavespeed run hero -p "a landing page hero image" --json --download

View available aliases:

# List aliases from project and user configuration.
wavespeed aliases
 
# Return aliases as JSON.
wavespeed aliases --json

Global Configuration

Use config for machine-level defaults:

# View current CLI configuration.
wavespeed config
 
# Set a custom WaveSpeedAI API base URL.
wavespeed config --base-url https://api.wavespeed.ai
 
# Set the default model used when run omits a model ID.
wavespeed config --default-model wavespeed-ai/z-image/turbo
 
# Set the default local output directory.
wavespeed config --output-dir wavespeed-output
 
# Reset CLI configuration to defaults.
wavespeed config --reset

Use wavespeed.json for project settings that can be shared with a repository. Keep login credentials and personal defaults in local user configuration.

Connect a Coding Agent to the LLM API

wavespeed setup points a coding agent at the WaveSpeed LLM API, so you can use WaveSpeed-hosted models inside the tools you already use. It uses the API key from wavespeed login.

# List supported agents and which ones are on this machine.
wavespeed setup
 
# Preview the change without writing anything.
wavespeed setup opencode --dry-run
 
# Configure an agent, then verify it with a live streamed request.
wavespeed setup opencode
 
# Use a different model.
wavespeed setup opencode --model <model_id>
 
# Restore the agent's previous settings.
wavespeed setup opencode --undo
AgentNameConfiguration it edits
Codex (CLI and desktop app)codex~/.codex/config.toml
Claude Codeclaude~/.claude/settings.json
Gemini CLIgemini~/.gemini/.env and ~/.gemini/settings.json
OpenCodeopencode~/.config/opencode/opencode.json
OpenClawopenclaw~/.openclaw/openclaw.json
Hermeshermes~/.hermes/config.yaml
Kilo Codekilo~/.config/kilo/kilo.json
Qwen Codeqwen~/.qwen/settings.json
MiniMax Mini-Agentminiagent~/.mini-agent/config/config.yaml
Crushcrush~/.config/crush/crush.json
Factory Droiddroid~/.factory/settings.json
Aideraider~/.aider.conf.yml
Continue CLIcontinue~/.continue/config.yaml
Goosegooseconfig.yaml and custom_providers/wavespeed.json in Goose’s config folder
DeepSeek Harnessdsh~/.dsh/cordis.patch.yml (or $DSH_HOME/cordis.patch.yml)
Cline (CLI)clineCline’s own provider settings, through cline auth

Things to know:

  • The default model is deepseek/deepseek-v4.1-flash-1017. Use --model to choose another model from the LLM Playground.
  • Only the WaveSpeed entries are added or changed. The CLI saves a copy of the original file as <file>.wavespeed.bak the first time it edits it, and --undo restores the previous values.
  • Claude Code, Gemini CLI, Cline, Mini-Agent, and Aider need your API key stored in their own configuration, so the CLI asks for confirmation (or --yes). For Claude Code, this also makes every Claude Code session use WaveSpeed until you run --undo.
  • The other agents read the key from the WAVESPEED_API_KEY environment variable. Set it in the shell that starts the agent.
  • Undo puts the original file back exactly when you have not edited it since setup, and otherwise removes only the WaveSpeed entries.
  • Factory Droid is configured with sessionDefaultSettings.model, so droid exec uses the WaveSpeed model without -m. Continue CLI uses the first chat model in its list, so the WaveSpeed entry is added first.
  • Codex desktop and Codex CLI read the same configuration file; restart the desktop app after setup.
  • OpenClaw’s configuration file is rewritten as plain JSON, so comments in it are not kept (the backup keeps them).
  • Gemini CLI reads ~/.gemini/.env only in folders it trusts. Accept its trust prompt on first start, or set GEMINI_CLI_TRUST_WORKSPACE=true for scripts and CI.
  • Cline is supported through its command-line tool only. The VS Code extension has no configuration file the CLI can edit.

For manual configuration and protocol details, see Connect Coding Agents to WaveSpeedAI LLM.

Use with Coding Agents

WaveSpeed CLI is agent-ready. Codex, Claude Code, Cursor, and other coding agents can discover models, inspect schemas, estimate prices, run generations, and parse JSON output directly from the terminal.

Install the agent skill:

# Install the WaveSpeed skill file for compatible coding agents.
wavespeed skill install

This creates:

.claude/skills/wavespeed/SKILL.md

After the skill is installed, you can ask a coding agent for tasks such as:

Find a text-to-image model, generate a product photo, and download it locally.

The agent should follow the same CLI flow:

# Find popular text-to-image models.
wavespeed models --type text-to-image --popular
 
# Inspect the selected model inputs.
wavespeed schema <model_id>
 
# Estimate the cost for the intended prompt.
wavespeed price <model_id> -p "..."
 
# Run the model, return JSON, and download outputs.
wavespeed run <model_id> -p "..." --json --download

This keeps the integration simple: agents call the same CLI commands a developer would run, and JSON output gives them a stable result to read.

Agent-specific packages

AgentInstall
Claude Code/plugin marketplace add WaveSpeedAI/claude-plugins then /plugin install wavespeed@wavespeed; run /mcp and approve the connection in your browser (bundles the hosted MCP server and the skill)
Kimi Code CLI/plugins install https://github.com/WaveSpeedAI/wavespeed-kimi-plugin (bundles the MCP server and the skill; .claude/skills/ from wavespeed skill install is also read as-is)
Gemini CLIgemini extensions install https://github.com/WaveSpeedAI/wavespeed-gemini-extension
GitHub Copilot CLIcopilot plugin marketplace add WaveSpeedAI/claude-plugins, then /plugin install wavespeed@wavespeed
Factory Droiddroid plugin marketplace add WaveSpeedAI/claude-plugins, then droid plugin install wavespeed@wavespeed --scope user
KiroPowers → Add Custom Power → Import from GitHub → https://github.com/WaveSpeedAI/agent-skills
OpenHands, Hermes Agent, Antigravity, Amp, others reading .agents/skills/npx skills add WaveSpeedAI/agent-skills
Qwen Codeqwen extensions install WaveSpeedAI/wavespeed-gemini-extension (or qwen extensions install WaveSpeedAI/claude-plugins:wavespeed)
DeepSeek HarnessWaveSpeedAI/wavespeed-dsh-skill
Codexcodex plugin marketplace add WaveSpeedAI/codex-plugins, then install WaveSpeed from /plugins and approve the connection in your browser (bundles the hosted MCP server and the skill; wavespeed skill install also writes .agents/skills/, which Codex reads)
OpenCodeadd "plugin": ["@wavespeed/opencode"] to your OpenCode config, then opencode mcp auth wavespeed to approve in your browser (bundles the hosted MCP server and the skill; WaveSpeedAI/wavespeed-opencode). wavespeed skill install also works: OpenCode reads .claude/skills/
Cursorwavespeed skill install

Prefer MCP over a CLI skill? Every MCP client can use @wavespeed/mcp: npx -y @wavespeed/mcp@latest, authenticated by WAVESPEED_API_KEY or the CLI’s stored login. To add WaveSpeed by URL instead, see WaveSpeed MCP Server.

Script Automation

When calling the CLI from scripts, use wavespeed on macOS and Linux. On Windows, npm global binaries are usually exposed through .cmd shims, so call wavespeed.cmd directly or invoke it through cmd.exe.

Node.js

import { execFile } from "node:child_process";
import { promisify } from "node:util";
 
const execFileAsync = promisify(execFile);
const isWindows = process.platform === "win32";
 
const command = isWindows
  ? (process.env.ComSpec || "C:\\Windows\\System32\\cmd.exe")
  : "wavespeed";
 
const args = isWindows
  ? [
      "/d",
      "/s",
      "/c",
      "wavespeed.cmd",
      "run",
      "wavespeed-ai/z-image/turbo",
      "-p",
      "a clean product photo",
      "-i",
      "size=1024*1024",
      "--json",
      "--download",
    ]
  : [
      "run",
      "wavespeed-ai/z-image/turbo",
      "-p",
      "a clean product photo",
      "-i",
      "size=1024*1024",
      "--json",
      "--download",
    ];
 
// Run the CLI with JSON output so Node.js can parse the result.
const { stdout } = await execFileAsync(command, args);
const result = JSON.parse(stdout);
 
console.log(result.outputs);
console.log(result.saved);

Python

import json
import os
import subprocess
 
command = "wavespeed.cmd" if os.name == "nt" else "wavespeed"
 
# Run the CLI with JSON output so Python can parse the result.
result = subprocess.run(
    [
        command,
        "run",
        "wavespeed-ai/z-image/turbo",
        "-p",
        "a clean product photo",
        "-i",
        "size=1024*1024",
        "--json",
        "--download",
    ],
    capture_output=True,
    text=True,
    check=True,
)
 
data = json.loads(result.stdout)
print(data["outputs"])
print(data["saved"])
© 2026 WaveSpeedAI. All rights reserved.