muapi-models

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Muapi models

Muapi 模型

Muapi is one API (
x-api-key
) in front of 500+ models: image, video, audio and speech, lipsync, 3D, LLM text, SEO/data tools, social publishing and utilities. Provider names are hidden; you only see Muapi model names, categories, schemas and costs. Model names are read live, so new models work immediately. Never rely on a remembered model list.
Workflow: discover -> inspect -> estimate -> run -> poll -> download.
Muapi 通过一个 API(
x-api-key
)接入 500 多个模型:图像、视频、音频和语音、唇形同步、3D、LLM 文本、SEO/数据工具、社交媒体发布和实用工具。提供商名称均被隐藏;你只会看到 Muapi 模型名称、类别、schema 和费用。模型名称为实时读取,因此新模型可立即使用。切勿依赖记忆中的模型列表。
工作流程:发现 -> 检查 -> 估算 -> 运行 -> 轮询 -> 下载。

Setup

设置

  1. Create a key at https://muapi.ai/dashboard (or a free sandbox key, see below).
  2. Export it and restart your agent from that same shell:
    • macOS/Linux:
      export MUAPI_API_KEY=your_key
    • Windows PowerShell:
      $env:MUAPI_API_KEY = "your_key"
      and
      setx MUAPI_API_KEY "your_key"
  3. Keep the key in the environment only. Never write it into project files, commits or chat.
Sandbox key (returns mock outputs instantly, no credits spent), useful for testing a flow:
bash
curl -s -X POST https://api.muapi.ai/api/v1/keys -H "Content-Type: application/json" -d '{"is_test": true}'
Auth is always the
x-api-key: $MUAPI_API_KEY
header. If the
muapi
CLI is installed (
pip install muapi-cli
or
npm i -g muapi-cli
) prefer it, since it handles upload, polling and
--output-json
. Otherwise use the HTTP calls below (
curl
; on Windows PowerShell use
curl.exe
).
  1. 在 https://muapi.ai/dashboard 创建密钥(或使用下文的免费 sandbox 密钥)。
  2. 导出密钥,并从同一个 shell 重启你的 Agent:
    • macOS/Linux:
      export MUAPI_API_KEY=your_key
    • Windows PowerShell:
      $env:MUAPI_API_KEY = "your_key"
      ,并运行
      setx MUAPI_API_KEY "your_key"
  3. 仅将密钥保存在环境变量中。切勿将其写入项目文件、提交记录或聊天内容。
Sandbox 密钥会立即返回模拟输出,不消耗额度,适合测试流程:
bash
curl -s -X POST https://api.muapi.ai/api/v1/keys -H "Content-Type: application/json" -d '{"is_test": true}'
身份验证始终使用
x-api-key: $MUAPI_API_KEY
请求头。如果已安装
muapi
CLI(
pip install muapi-cli
或
npm i -g muapi-cli
),建议优先使用它,因为它可以处理上传、轮询和
--output-json
。否则请使用以下 HTTP 调用(
curl
;在 Windows PowerShell 上使用
curl.exe
)。

Rules

规则

  • User instructions first, then any tool they already configured, then Muapi.
  • Always inspect before you run. Never guess fields or endpoint paths; schemas change.
  • Estimate cost before spending credits on anything non-trivial; check balance if no budget was given.
  • Submit, then poll every 3-10 seconds. Don't hold one long request open.
  • On
    failed
    , show the
    error
    field verbatim. Don't silently retry.
  • Name the model explicitly if the user did; otherwise state which model you picked and why.
  • 优先遵循用户指令,然后使用用户已配置的任何工具,最后才使用 Muapi。
  • 运行前始终进行检查。切勿猜测字段或 endpoint 路径;schema 会发生变化。
  • 对任何非轻量级操作,在消耗额度前估算成本;如果未提供预算,则检查余额。
  • 提交后,每 3~10 秒轮询一次。不要保持一个长时间请求一直开启。
  • 遇到
    failed
    时,逐字显示
    error
    字段。不要静默重试。
  • 如果用户指定了模型,请明确说出模型名称;否则请说明你选择了哪个模型以及原因。

1. Discover

1. 发现

bash
curl -s "https://api.muapi.ai/api/v1/models?category=Text%20to%20Image"
curl -s "https://api.muapi.ai/api/v1/models?family=seo"
There is no free-text search param: fetch a category and filter client-side by name/description, and try a few keyword variants. Categories:
Text to Image
,
Image to Image
,
Text to Video
,
Image to Video
,
Video to Video
,
Audio to Video
(lipsync),
Text to Audio
,
Image to 3D
,
Text to 3D
,
Text to Text
(LLMs and data tools),
Lora Support
,
Training
. CLI:
muapi discover "cinematic image to video" --output-json
bash
curl -s "https://api.muapi.ai/api/v1/models?category=Text%20to%20Image"
curl -s "https://api.muapi.ai/api/v1/models?family=seo"
没有自由文本搜索参数:获取一个类别,然后在客户端按名称或描述进行筛选,并尝试几种关键词变体。类别包括:
Text to Image
、
Image to Image
、
Text to Video
、
Image to Video
、
Video to Video
、
Audio to Video
(唇形同步)、
Text to Audio
、
Image to 3D
、
Text to 3D
、
Text to Text
(LLM 和数据工具)、
Lora Support
、
Training
。 CLI:
muapi discover "cinematic image to video" --output-json

2. Inspect

2. 检查

bash
curl -s "https://api.muapi.ai/api/v1/models/{name}"
Returns the input schema (required fields, allowed values, defaults), pricing and the real
endpoint
to POST to. CLI:
muapi inspect {name} --output-json
bash
curl -s "https://api.muapi.ai/api/v1/models/{name}"
返回输入 schema(必填字段、允许值、默认值)、定价以及要发送 POST 请求的实际
endpoint
。 CLI:
muapi inspect {name} --output-json

3. Estimate cost

3. 估算成本

bash
curl -s -X POST "https://api.muapi.ai/api/v1/models/{name}/estimate-cost" \
  -H "Content-Type: application/json" -d @payload.json
Same body you would send to run it. Balance:
GET /api/v1/account/balance
(CLI:
muapi account balance
).
bash
curl -s -X POST "https://api.muapi.ai/api/v1/models/{name}/estimate-cost" \
  -H "Content-Type: application/json" -d @payload.json
使用与运行模型时相同的请求体。余额查询:
GET /api/v1/account/balance
(CLI:
muapi account balance
)。

4. Upload input files

4. 上传输入文件

Models that take an image, video or audio need a hosted URL. Upload local files first:
bash
curl -s -X POST https://api.muapi.ai/api/v1/upload_file \
  -H "x-api-key: $MUAPI_API_KEY" -F "file=@./input.png"
Limits: images 10MB, videos 50MB. CLI:
muapi upload file ./input.png --output-json
接受图像、视频或音频的模型需要一个托管 URL。请先上传本地文件:
bash
curl -s -X POST https://api.muapi.ai/api/v1/upload_file \
  -H "x-api-key: $MUAPI_API_KEY" -F "file=@./input.png"
限制:图像 10MB,视频 50MB。 CLI:
muapi upload file ./input.png --output-json

5. Run

5. 运行

POST to the
endpoint
from step 2 (never a path you assumed):
bash
curl -s -X POST "https://api.muapi.ai{endpoint}" \
  -H "x-api-key: $MUAPI_API_KEY" -H "Content-Type: application/json" -d @payload.json
向第 2 步返回的
endpoint
发起 POST 请求(切勿使用自行推测的路径):
bash
curl -s -X POST "https://api.muapi.ai{endpoint}" \
  -H "x-api-key: $MUAPI_API_KEY" -H "Content-Type: application/json" -d @payload.json

-> {"request_id": "...", "status": "processing"}

-> {"request_id": "...", "status": "processing"}


CLI: `muapi run {name} --input payload.json --no-wait --output-json`

CLI:`muapi run {name} --input payload.json --no-wait --output-json`

6. Poll

6. 轮询

bash
curl -s "https://api.muapi.ai/api/v1/predictions/{request_id}/result" -H "x-api-key: $MUAPI_API_KEY"
status
is
processing
,
completed
or
failed
. On
completed
,
outputs
is an array of URLs. CLI:
muapi runs get {request_id} --wait --output-json
bash
curl -s "https://api.muapi.ai/api/v1/predictions/{request_id}/result" -H "x-api-key: $MUAPI_API_KEY"
status
为
processing
、
completed
或
failed
。状态为
completed
时,
outputs
是一个 URL 数组。 CLI:
muapi runs get {request_id} --wait --output-json

7. Save results

7. 保存结果

Result URLs are kept for 30 days, then expire. As soon as a task completes, download every output to the location the user asked for (for example
./public/hero.png
) and tell them the path:
bash
curl -L -o ./public/hero.png "{output_url}"
If the user wants it in their app, write the integration code instead of just a file.
结果 URL 会保留 30 天,之后过期。任务完成后,应立即将每个输出下载到用户要求的位置(例如
./public/hero.png
),并告知用户文件路径:
bash
curl -L -o ./public/hero.png "{output_url}"
如果用户希望将结果集成到应用中,请编写相应的集成代码,而不要只保存文件。

Writing good requests

编写高质量请求

Ask for or infer: the output destination, a specific model if they have a preference, and key parameters (aspect ratio, resolution, duration). Examples:
  • "Make a 1:1 product photo of a white ceramic mug with Muapi, save to ./public/mug.png"
  • "Generate a 30 second lo-fi background track with Muapi"
  • "Turn README.md into a spoken intro with a Muapi speech model"
询问或推断以下信息:输出目的地、用户有偏好时的具体模型,以及关键参数(宽高比、分辨率、时长)。示例:
  • “使用 Muapi 制作一张 1:1 的白色陶瓷杯产品照片,保存到 ./public/mug.png”
  • “使用 Muapi 生成一段 30 秒的 lo-fi 背景曲目”
  • “使用 Muapi 语音模型将 README.md 转换为口播简介”

Troubleshooting

故障排除

ProblemFix
MUAPI_API_KEY
missing
Export it and restart the agent from the same terminal
401Check the key at https://muapi.ai/dashboard; header must be
x-api-key
Insufficient creditsTop up in the dashboard, then rerun
failed
task
Show
error
, adjust parameters from the schema, retry once
Expired result link (older than 30 days)Re-run, and save outputs locally next time
curl
rejects args on Windows
Use
curl.exe
问题解决方法
缺少
MUAPI_API_KEY
导出密钥,并从同一个终端重启 Agent
401检查 https://muapi.ai/dashboard 中的密钥;请求头必须为
x-api-key
额度不足在 dashboard 中充值,然后重新运行
任务状态为
failed
显示
error
,根据 schema 调整参数后重试一次
结果链接已过期(超过 30 天)重新运行,并在下次运行时将输出保存到本地
Windows 上
curl
拒绝参数
使用
curl.exe

Other interfaces

其他接口