muapi-media
它能做什么
这个智能体使用 MuAPI 来生成图片和视频。它会为你挑选最合适的模型,安全地处理 API 密钥,并下载生成的结果。
适用场景
- ✓当你明确要求用 MuAPI 生成图片或视频时。
- ✓当你已经在使用某个媒体工作流,并需要接入 MuAPI 时。
- ✓当你想比较或切换不同的媒体生成模型,又不想改动现有工作流时。
技能链接
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/muapi-media/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“用 MuAPI 生成一张戴着派对帽的猫的图片。”
每周 5 个新技能,1 分钟读完。
工作原理
它会先查看 MuAPI 中可用的图片或视频模型,然后获取所选模型的具体说明,再提交你的请求。最后,它会持续查询状态,直到图片或视频生成完毕,可以下载。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
MuAPI Media
Overview
Use MuAPI's unified asynchronous API for image and video generation when a workflow needs model choice without a separate integration for every provider. The catalog and each model's input schema are authoritative; this skill does not guess fields, bundle an SDK, or hide a billable generation request. For a capability overview, see the MuAPI AI video API.
When to Use This Skill
- Use when the user explicitly asks to generate an image or video with MuAPI.
- Use when an existing media workflow needs a hosted asynchronous API and can send an authorized HTTPS request.
- Use when the user needs to compare or switch among current media models without changing the surrounding submit-and-poll workflow.
- Do not use this skill for text chat or for a provider whose current schema has not been fetched and checked.
Preconditions
- Confirm that the user is authorized to send the prompt and any reference media to a third-party service.
- Explain that generation may be billable and obtain approval immediately before the generation request.
- Require
MUAPI_API_KEYin the environment. Never ask the user to paste it into chat, source files, command history, or logs. - Confirm the requested media type, output location, and whether the user wants a single generation or an explicitly approved batch.
API Contract
| Operation | Method and endpoint |
|---|---|
| List current models | GET https://api.muapi.ai/api/v1/models |
| Read one model's schema | GET https://api.muapi.ai/api/v1/models/{model} |
| Submit a generation | POST https://api.muapi.ai/{catalog endpoint} |
| Poll a prediction | GET https://api.muapi.ai/api/v1/predictions/{request_id}/result |
Generation and prediction requests use:
x-api-key: $MUAPI_API_KEY
Content-Type: application/json
The catalog returns a model name, category, endpoint, and other metadata. The
endpoint value already includes /api/v1/; append it to https://api.muapi.ai
without adding a second version prefix. Model input and output fields vary, so
read the selected model's schema immediately before preparing a request.
How It Works
1. Discover and validate a model
Use a temporary directory for response files and keep credentials out of every file. The catalog lookup is read-only:
workdir=$(mktemp -d "${TMPDIR:-/tmp}/muapi-media.XXXXXX")
curl --fail --silent --show-error \
--header "Accept: application/json" \
"https://api.muapi.ai/api/v1/models" \
--output "$workdir/models.json"
jq -r '
.models[]
| select(((.category // "") | ascii_downcase | test("image|video|audio|3d")))
| [.name, .category, .endpoint]
| @tsv
' "$workdir/models.json"
Select a model from the current catalog, then fetch its detailed schema. Do not copy a payload from a different model just because the names look similar:
export MUAPI_MODEL="<model name from the catalog>"
curl --fail --silent --show-error \
--header "Accept: application/json" \
"https://api.muapi.ai/api/v1/models/${MUAPI_MODEL}" \
--output "$workdir/model.json"
jq '.input_schema.schemas.input_data' "$workdir/model.json"
Check required fields, types, enum values, size limits, and the output schema. If the model requires an image or video input, use the exact documented field and an authorized HTTPS input URL; do not invent an upload contract.
2. Prepare one reviewed request
Set the key only in the environment and stop before submission if it is absent:
test -n "${MUAPI_API_KEY:-}" || {
echo "Set MUAPI_API_KEY before generation." >&2
exit 1
}
export MUAPI_PROMPT="A small paper boat crossing a calm pond at sunrise, steady camera"
# Add only fields confirmed by model.json. This example uses a prompt field;
# many models also require duration, resolution, aspect ratio, or an input URL.
jq -n \
--arg prompt "$MUAPI_PROMPT" \
'{prompt: $prompt}' \
> "$workdir/request.json"
Review the model, requested parameters, destination, and estimated cost with
the user. Do not put MUAPI_API_KEY in request.json.
3. Submit exactly once
Resolve the catalog endpoint and make one POST. Do not automatically retry a generation POST after a timeout: the original task may have been accepted.
model_endpoint=$(jq -er --arg name "$MUAPI_MODEL" '
.models[]
| select(.name == $name)
| .endpoint
| select(type == "string" and startswith("/api/v1/"))
…
常见问题
使用这个要花钱吗?
媒体生成可能是收费服务。在发起生成请求之前,最好先确认价格。
MuAPI 怎么知道该用哪个模型?
MuAPI 维护着一份模型目录。这个智能体会查阅该目录,为你的请求找到最合适的模型。
API 密钥存放在哪里?
API 密钥配置在系统的环境变量中,不会直接分享给你,也不会保存在任何可见的位置。
详情
作者的原始描述
Generate images and videos with MuAPI's schema-driven asynchronous media API while protecting keys, polling, and output downloads.
热度
- GitHub 星标
- 48k
- 排名
- #5254
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
00-andruia-consultant
48k帮你的智能体启动或改进 AI 项目。它可以分析代码、推荐工具,并用西班牙语制定行动计划。
007
48k让你的智能体执行安全审计和威胁建模。它有助于保护项目免受攻击和漏洞的威胁。
10-andruia-skill-smith
48k帮你的智能体创建或改进 AI 工具。它可以定义工具的工作方式、编写文档,并验证其结构。
20-andruia-niche-intelligence
48k让你的智能体创建某个特定行业的摘要。它有助于借助可靠的信息来源,了解项目的背景、规则、使用模式和风险。