muapi-workflow
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAI Workflow Builder
AI工作流构建器
Chain any combination of muapi.ai generation steps into automated pipelines. The AI architect converts your plain-language description into a runnable node graph.
将muapi.ai的任意生成步骤组合为自动化流水线。AI架构师可将你的自然语言描述转换为可运行的节点图。
Prerequisites
前置要求
Always ensure the CLI is up-to-date before running any commands. Reinstall from source at the start of every session:
muapibash
pip install --upgrade /path/to/muapi-cliReplace with the actual path to the directory in the workspace (the directory containing ).
/path/to/muapi-climuapi-clipyproject.toml在运行任何命令前,请确保 CLI是最新版本。每次会话开始时从源码重新安装:
muapibash
pip install --upgrade /path/to/muapi-cli将替换为工作区中目录的实际路径(包含的目录)。
/path/to/muapi-climuapi-clipyproject.tomlCore Operations
核心操作
- Generate () — AI architect creates a workflow from a description
generate-workflow.sh - Discover () — Find a relevant existing workflow by natural language
discover-workflow.sh - Edit () — Modify an existing workflow with a prompt
generate-workflow.sh --workflow-id - Interactive Run () — Prompt for inputs and execute a workflow
interactive-run.sh - Run () — Execute a workflow, poll node-by-node, collect outputs
run-workflow.sh - CLI () — Full CRUD + visualization directly from the terminal
muapi workflow
- 生成()——AI架构师根据描述创建工作流
generate-workflow.sh - 发现()——通过自然语言查找相关的现有工作流
discover-workflow.sh - 编辑()——通过提示词修改现有工作流
generate-workflow.sh --workflow-id - 交互式运行()——提示输入参数并执行工作流
interactive-run.sh - 运行()——执行工作流,逐节点轮询,收集输出结果
run-workflow.sh - CLI操作()——直接在终端完成完整的CRUD(创建、读取、更新、删除)及可视化操作
muapi workflow
Agent Guided Discovery & Selection
Agent引导的发现与选择
As an AI agent, you have the ability to read and understand the purpose of available workflows to select the best one for the user's task (e.g., "create a UGC video").
- Discover: Fetch the catalog of available workflows and their descriptions in JSON format.
bash
muapi workflow discover --output-json - Match (Internal Reasoning): Use your LLM capabilities to analyze the ,
name, andcategoryfields of the returned workflows. Find the best match for the user's intent.description - Analyze: If you find a promising candidate, inspect its structure to ensure it has the necessary nodes and parameters.
CRITICAL RULE: The output ofbash
muapi workflow get <workflow_id>will include an "API Inputs" table. You MUST read this table to understand what inputs are required.muapi workflow get - Choose & Confirm & Prompt User:
- If one workflow is a perfect match, you MUST ask the user to provide the exact values for the required API inputs before executing it. Never invent or guess input values (like prompts, URLs, etc.) on your own.
- If multiple workflows are highly relevant, present the options to the user with their descriptions and ask them to confirm which one to use, and also ask for the required inputs.
- If no workflow matches the user's complex request, offer to architect a new one using .
muapi workflow create
作为AI Agent,你能够读取并理解可用工作流的用途,从而为用户任务选择最合适的工作流(例如“创建UGC视频”)。
- 发现:获取可用工作流目录及其JSON格式的描述。
bash
muapi workflow discover --output-json - 匹配(内部推理):利用你的LLM能力分析返回工作流的、
name和category字段,找到与用户意图最匹配的选项。description - 分析:如果找到合适的候选工作流,请检查其结构以确保包含必要的节点和参数。
重要规则:bash
muapi workflow get <workflow_id>的输出将包含一个“API输入”表格。你必须阅读此表格以了解所需的输入参数。muapi workflow get - 选择、确认并提示用户:
- 如果有一个工作流完全匹配,你必须要求用户提供所需API输入的准确值,然后再执行。切勿自行编造或猜测输入值(如提示词、URL等)。
- 如果有多个高度相关的工作流,请向用户展示选项及其描述,让用户确认使用哪一个,并同时要求提供所需的输入参数。
- 如果没有工作流匹配用户的复杂请求,提议使用来构建一个新的工作流。
muapi workflow create
Example Agent Reasoning
Agent推理示例
"The user wants a product promo video. I fetched the catalog using. I see two potential workflows:discover
: 'Product promo with background music'wf_123 : 'Simple video gen' I will analyzewf_456withwf_123. It has the required nodes. I will suggestgetor just run it if the match is precise."wf_123
“用户想要一个产品宣传视频。我使用获取了目录。发现两个潜在工作流:discover
:‘带背景音乐的产品宣传视频’wf_123 :‘简单视频生成’ 我将用wf_456分析get,它包含所需的节点。我会推荐wf_123,如果匹配度足够高也可直接运行。"wf_123
Protocol: Building a Workflow
工作流构建流程
Step 1 — Describe your pipeline
步骤1 — 描述你的流水线
bash
muapi workflow create "take a text prompt, generate an image with flux-dev, then upscale it to 4K"The architect returns a workflow with a unique ID and a node graph. Save the ID.
bash
muapi workflow create "接收文本提示词,使用flux-dev生成图像,然后将其放大至4K分辨率"架构师会返回一个带有唯一ID和节点图的工作流,请保存该ID。
Step 2 — Inspect and visualize
步骤2 — 检查与可视化
bash
undefinedbash
undefinedRich ASCII node graph in the terminal
在终端中显示富文本ASCII节点图
muapi workflow get <workflow_id>
muapi workflow get <workflow_id>
Or raw JSON
或导出为原始JSON格式
muapi workflow get <workflow_id> --output-json
undefinedmuapi workflow get <workflow_id> --output-json
undefinedStep 3 — Run it
步骤3 — 运行工作流
bash
undefinedbash
undefinedRun with specific inputs
使用指定输入运行
muapi workflow execute <workflow_id>
--input "node1.prompt=a glowing crystal cave at midnight"
--input "node1.prompt=a glowing crystal cave at midnight"
muapi workflow execute <workflow_id>
--input "node1.prompt=a glowing crystal cave at midnight"
--input "node1.prompt=a glowing crystal cave at midnight"
Use --download to pull results locally
使用--download参数将结果下载到本地
muapi workflow execute <workflow_id>
--input "node1.prompt=a sunset"
--download ./outputs
--input "node1.prompt=a sunset"
--download ./outputs
undefinedmuapi workflow execute <workflow_id>
--input "node1.prompt=a sunset"
--download ./outputs
--input "node1.prompt=a sunset"
--download ./outputs
undefinedStep 4 — Discovery (Optional)
步骤4 — 发现(可选)
If you want to reuse an existing workflow instead of creating a new one:
bash
undefined如果你想复用现有工作流而非创建新的:
bash
undefinedSearch by keywords
按关键词搜索
muapi workflow discover "ugc video"
undefinedmuapi workflow discover "ugc video"
undefinedStep 5 — Interactive Execution
步骤5 — 交互式执行
Run a workflow and have the CLI prompt you for each required input:
bash
muapi workflow run-interactive <workflow_id>运行工作流并通过CLI提示你输入每个必填参数:
bash
muapi workflow run-interactive <workflow_id>Workflow Examples
工作流示例
Image Pipelines
图像流水线
bash
undefinedbash
undefinedText → Image → Upscale
文本 → 图像 → 放大
muapi workflow create "take a text prompt, generate with flux-dev, upscale the result"
muapi workflow create "接收文本提示词,使用flux-dev生成图像,然后放大结果"
Text → Image → Background removal → Product shot
文本 → 图像 → 背景移除 → 产品图
muapi workflow create "generate a product image with hidream, remove background, create professional product shot"
undefinedmuapi workflow create "使用hidream生成产品图像,移除背景,创建专业产品展示图"
undefinedVideo Pipelines
视频流水线
bash
undefinedbash
undefinedText → Video
文本 → 视频
muapi workflow create "generate a 10-second cinematic video from a text prompt using kling-master"
muapi workflow create "使用kling-master根据文本提示词生成10秒 cinematic视频"
Image → Video → Lipsync
图像 → 视频 → 唇形同步
muapi workflow create "animate an input image with seedance, then apply lipsync from an audio file"
---muapi workflow create "使用seedance将输入图像动画化,然后对音频文件应用唇形同步"
---Editing an Existing Workflow
编辑现有工作流
bash
undefinedbash
undefinedAdd a step
添加步骤
muapi workflow edit <id> --prompt "add a face-swap step after the image generation"
muapi workflow edit <id> --prompt "在图像生成后添加换脸步骤"
Swap a model
替换模型
muapi workflow edit <id> --prompt "change the video model from kling to veo3"
---muapi workflow edit <id> --prompt "将视频模型从kling替换为veo3"
---CLI Reference
CLI参考
bash
undefinedbash
undefinedList all your workflows
列出所有你的工作流
muapi workflow list
muapi workflow list
Browse templates
浏览模板
muapi workflow templates
muapi workflow templates
Generate new workflow
生成新工作流
muapi workflow create "text → flux image → upscale → face swap"
muapi workflow create "文本 → flux图像 → 放大 → 换脸"
Visualize a workflow
可视化工作流
muapi workflow get <id>
muapi workflow get <id>
Execute with inputs
带输入参数执行
muapi workflow execute <id> --input "node1.prompt=a sunset"
muapi workflow execute <id> --input "node1.prompt=a sunset"
Monitor a run
监控运行状态
muapi workflow status <run_id>
muapi workflow status <run_id>
Get outputs
获取输出结果
muapi workflow outputs <run_id> --download ./results
muapi workflow outputs <run_id> --download ./results
Edit with AI
用AI编辑工作流
muapi workflow edit <id> --prompt "add lipsync at the end"
muapi workflow edit <id> --prompt "在末尾添加唇形同步"
Rename / delete
重命名/删除
muapi workflow rename <id> --name "Product Pipeline v2"
muapi workflow delete <id>
---muapi workflow rename <id> --name "Product Pipeline v2"
muapi workflow delete <id>
---MCP Tools (for AI agents)
MCP工具(面向AI Agent)
| Tool | Description |
|---|---|
| List user's workflows |
| AI architect: prompt → workflow |
| Get workflow definition + node graph |
| Run with specific inputs |
| Node-by-node run status |
| Final output URLs |
| 工具 | 描述 |
|---|---|
| 列出用户的工作流 |
| AI架构师:提示词 → 工作流 |
| 获取工作流定义 + 节点图 |
| 带指定输入参数运行 |
| 逐节点运行状态 |
| 最终输出URL |
Constraints
限制条件
- Workflows can contain any combination of muapi.ai nodes (image, video, audio, enhance, edit)
- Node outputs are automatically wired as inputs to downstream nodes
- mode waits up to 120s for generation; use
--syncfor complex workflows and poll separately--async - Run timeouts: 10 minutes maximum per workflow execution
- 工作流可包含任意组合的muapi.ai节点(图像、视频、音频、增强、编辑)
- 节点输出会自动连接到下游节点的输入
- 模式最多等待120秒生成结果;复杂工作流请使用
--sync模式并单独轮询状态--async - 运行超时:每个工作流执行的最长时间为10分钟