WaveSpeed CLI · MCP
在 Claude Code、Codex 和終端機裡生成圖片和影片
一個開源 CLI,執行任何 WaveSpeed AI 模型。圖像、影片、音訊、3D。為終端機和 Codex、Claude Code、Claude Cowork、Cursor 等編碼 agent 而設計。
在你的代理中接入 WaveSpeed
選擇你用的工具,查看最快的接入方式。每種方式都能使用完整模型庫,執行前先看價格。
Claude Code
外掛一次安裝即可取得託管 MCP 伺服器和 WaveSpeed 技能。
- 1
新增 WaveSpeed 外掛市集
$claude plugin marketplace add WaveSpeedAI/claude-plugins - 2
安裝外掛
$claude plugin install wavespeed@wavespeed - 3
在 Claude Code 中執行 /mcp,選擇 wavespeed,並在瀏覽器中核准連線
/mcp
其他方式
只要 MCP 伺服器,不要技能:
$claude mcp add --transport http wavespeed https://api.wavespeed.ai/mcpCodex
外掛一次安裝即可取得託管 MCP 伺服器和 WaveSpeed 技能。
- 1
新增 WaveSpeed 外掛市集
$codex plugin marketplace add WaveSpeedAI/codex-plugins - 2
在 Codex 中開啟 /plugins,安裝 WaveSpeed,並在瀏覽器中核准連線
/plugins
其他方式
只要 MCP 伺服器,不要技能:
$codex mcp add wavespeed --url https://api.wavespeed.ai/mcp && codex mcp login wavespeedOpenCode
外掛一次安裝即可取得託管 MCP 伺服器和 WaveSpeed 技能。
- 1
在 opencode.json 中加入外掛
{ "plugin": ["@wavespeed/opencode"] } - 2
登入並在瀏覽器中核准連線
$opencode mcp auth wavespeed
其他方式
只要 MCP 伺服器,不要技能:
$opencode mcp add wavespeed --url https://api.wavespeed.ai/mcp && opencode mcp auth wavespeedCursor
一鍵安裝連接託管 MCP 伺服器,無需安裝。
- 1
點擊按鈕並在 Cursor 中確認
加入 Cursor - 2
依提示登入 WaveSpeed 並核准連線
其他方式
或把以下內容加入 mcp.json:
{
"mcpServers": {
"wavespeed": { "url": "https://api.wavespeed.ai/mcp" }
}
}VS Code
一條指令連接託管 MCP 伺服器,無需安裝。
- 1
在終端機中執行
$code --add-mcp '{"name":"wavespeed","type":"http","url":"https://api.wavespeed.ai/mcp"}' - 2
依提示登入 WaveSpeed 並核准連線
其他方式
改在自己的電腦上執行伺服器:
Claude
自訂連接器適用於網頁版 Claude 和 Claude Desktop,無需安裝。
- 1
在 Claude 中開啟 Customize → Connectors → Add custom connector
- 2
貼上此位址
https://api.wavespeed.ai/mcp - 3
用你的 WaveSpeed 帳號登入
其他方式
改在自己的電腦上執行伺服器:
ChatGPT
自訂連接器在 ChatGPT 中把 WaveSpeed 新增為自訂 MCP 伺服器,無需安裝。
- 1
在 ChatGPT 中開啟 Plugins,選擇 Add custom MCP server
- 2
貼上此位址,保留結尾的 /mcp
https://api.wavespeed.ai/mcp - 3
選擇 OAuth,用你的 WaveSpeed 帳號登入
其他方式
ChatGPT 無法讀取你電腦上的檔案:請在對話中附加檔案或提供公開連結。
Gemini CLI
擴充功能為 Gemini CLI 打包的 WaveSpeed 技能,一條指令即可安裝和更新。
- 1
安裝 WaveSpeed CLI 並登入
$npm install -g @wavespeed/cli && wavespeed login - 2
安裝擴充功能
$gemini extensions install https://github.com/WaveSpeedAI/wavespeed-gemini-extension
DeepSeek Harness
技能外掛自動註冊 WaveSpeed 技能的 dsh 外掛。
- 1
安裝 WaveSpeed CLI 並登入
$npm install -g @wavespeed/cli && wavespeed login - 2
新增技能外掛
$dsh plugin --profile web add github:WaveSpeedAI/wavespeed-dsh-skill
其他 MCP 用戶端
託管 MCPWindsurf、Cline、GitHub Copilot、Goose 及其他任何 MCP 用戶端:用位址新增託管伺服器。
- 1
用此位址新增遠端 MCP 伺服器。多數用戶端接著會透過瀏覽器讓你登入。
https://api.wavespeed.ai/mcp
其他方式
用戶端不支援遠端 MCP?在本機執行伺服器:
{
"mcpServers": {
"wavespeed": {
"command": "npx",
"args": ["-y", "@wavespeed/mcp@latest"],
"env": { "WAVESPEED_API_KEY": "wsk_..." }
}
}
}已用 wavespeed login 登入?本機伺服器會沿用該登入,可以刪掉 env 這一行。
三條指令即可上線
- 1
安裝
需要 Node 18+。一次全域安裝就能在任何地方使用 wavespeed 執行檔。
$npm install -g @wavespeed/cli - 2
登入
在瀏覽器中開啟 access-key 頁面。我們會自動偵測剪貼簿中的金鑰並即時驗證。
$wavespeed login - 3
執行任意模型
所有模型形狀一致。傳入模型 ID 與輸入 — 取得 CDN URL,或將 --json 管道送入你的腳本。
$wavespeed run wavespeed-ai/z-image/turbo -p "a cat"
教你的程式設計代理使用 CLI
安裝一個技能,讓 Codex、Claude Code、Cursor 等代理知道如何呼叫它。
$wavespeed skill install沒有 Node.js?
在 macOS 和 Linux 上可改為安裝獨立執行檔;在 Windows 上請從 GitHub Releases 下載。
$curl -fsSL https://raw.githubusercontent.com/WaveSpeedAI/wavespeed-cli/main/install.sh | bash保持最新
一行指令升級到最新版本。
$wavespeed upgrade在你的程式設計代理中使用 WaveSpeed 模型
一鍵設定 Claude Code、Codex、OpenCode 等使用 WaveSpeed LLM API,隨時可還原。
$wavespeed setup
為人類與 agent 而生
依模型動態產生說明
執行 wavespeed run <model> -h,CLI 會即時取得該模型的輸入 schema 並印出它接受的確切 flag — 無需猜測。
隨你的儲存庫一起分發的別名
在 wavespeed.json 中定義具名捷徑,把模型 + 預設輸入打包起來。團隊拉取檔案,輸入 wavespeed run hero,就能得到符合品牌的輸出。
從設計上就是 agent 原生
每條指令都在 stdout 上輸出 --json,在 stderr 上輸出進度。放一個 SKILL.md,Codex、Claude Code、Claude Cowork 與 Cursor 就知道怎麼呼叫。
沒有魔法,也沒有常駐程序
CLI 永遠不會修改你的 prompt,也不會啟動背景程序。它直接呼叫 api.wavespeed.ai。開源,MIT 授權。
真實工作階段長這樣
從瀏覽目錄到 JSON 輸出 — 三條指令。
# 1. browse the catalog
$ wavespeed models --type text-to-image --popular
# 2. inspect a model's inputs — schema fetched live
$ wavespeed run wavespeed-ai/z-image/turbo -h
* prompt string
size string default: "1024*1024"
strength number default: 0.6 range: 0..1
output_format string default: "jpeg" enum: jpeg | png | webp
# 3. run — JSON out so you can pipe it
$ wavespeed run wavespeed-ai/z-image/turbo \
-p "a cyberpunk skyline at golden hour" --json
{
"model": "wavespeed-ai/z-image/turbo",
"outputs": ["https://example.com/output/skyline.jpeg"],
"elapsed_ms": 4718
}在 Claude Code 和 Codex 裡生成圖片和影片
安裝一次 CLI 和配套 skill,之後直接開口就好。程式代理會幫你執行指令,並把檔案存到你的專案裡。
幫我咖啡店的到達頁做一張 16:9 的主視覺:溫馨、日出時分,留出放標題的空間。
/filters:quality(82)/media/images/31fc1223-1f59-428c-91dd-ec3df11866d1.webp)
主視覺做好了:溫暖的日出光線灑在店面上,畫面夠寬,適合做橫幅。 · 花費 $0.045
generate image
$ wavespeed generate image "cozy coffee shop at sunrise, warm light in the windows, room for a headline" --aspect-ratio 16:9 --download不錯。在前窗寫上 "Open at 7"。
/filters:quality(82)/media/images/b021bf45-cfc6-419d-8e34-5d2db159895a.webp)
完成:窗上手寫了 "Open at 7",其他地方都沒動。 · 花費 $0.045
edit image
$ wavespeed edit image "add the words \"Open at 7\" in white hand lettering on the front window" --image @./hero.jpg --download在程式代理裡生成圖片和影片
如何在 Claude Code 裡生成圖片?
用 npm install -g @wavespeed/cli 安裝 CLI,用 wavespeed login 登入,再用 wavespeed skill install 加入 skill。接著請 Claude Code 生成圖片,它會執行 wavespeed generate image 並把檔案存到你的專案裡。
如何在 Codex 裡生成圖片和影片?
安裝並登入 CLI,然後執行 wavespeed skill install,讓 Codex 學會這些指令。請 Codex 生成圖片或影片,它就會替你執行;也可以從 /plugins 安裝 WaveSpeed 外掛。
代理實際執行的是什麼?
都是你看得懂、也能自己重複執行的一般指令:wavespeed generate image、wavespeed edit image、wavespeed generate video。本機檔案用 @./file 傳入,結果用 --download 下載。
在 Cursor 和其他程式代理裡也能用嗎?
可以。任何能執行終端機指令的代理都能使用 CLI,skill 會教它這些指令。支援 MCP 的代理也可以改為連接託管伺服器。
也能生成影片嗎?
可以。wavespeed generate video 能根據文字、起始圖片或參考圖生成影片,wavespeed edit video 和 extend video 能修改或延長既有影片。
費用怎麼算?
按次從你的 WaveSpeed 餘額扣款,不需訂閱。加上 --estimate 可以在執行前查看價格;每個結果都會顯示實際花費。
代理透過 MCP 能做什麼
適合日常圖片和影片工作的快捷工具,加上完整模型庫:搜尋模型、查看模型的真實輸入、查詢價格,然後執行。
generate_image依提示詞生成圖片,可附參考圖
edit_image編輯、換風格或合成現有圖片
generate_video依提示詞、首幀或參考素材生成影片
edit_video修改現有影片中的內容
extend_video用新畫面延長影片
list_models依文字或類型搜尋即時模型目錄
get_model_schema模型的真實輸入、必填欄位和預設值
run_model執行任意模型;本機 @檔案 輸入會自動上傳
get_price花錢前先報價
get_balance查看點數餘額
upload_file把本機檔案變成託管 URL
get_prediction依 id 取回耗時較長的生成任務
list_predictions查看生成歷史
list_billings查看逐筆扣款與退款
get_usage依日期與模型查看花費與用量
delete_predictions從歷史記錄中刪除任務(會先徵得你的同意)
upload_file 僅本機伺服器提供。遠端伺服器讀不到你的檔案:請傳公開連結,在能傳送 HTTP 請求的工具中使用 create_upload,或在 ChatGPT 裡直接把檔案附到對話中。
開源。今天就能用。
MIT 授權,在 npm 上以 @wavespeed 範圍發布,託管在 GitHub。歡迎提交 Issue 與 PR。