grok-image-to-video
它能做什么
这项技能通过 Hermes Web UI 调用 xAI Grok Imagine,把一张图片制作成一段短视频。适合想用已有照片做出动态影片的人。
适用场景
- ✓当你有一张图片,想把它做成一段简短动画时。
- ✓当你想为静态图片添加轻柔的镜头移动或自然的动态效果时。
- ✓当你需要保存完成的 MP4 文件以便分享的时候。
技能链接
https://github.com/EKKOLearnAI/ekko-studio/blob/main/packages/skills/grok-image-to-video/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请把这张风景照片做成一段短视频,加上缓慢的推近效果。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会把图片和动态提示词发送到 Hermes Web UI 的媒体接口。服务器会检查凭据,等待视频生成完成,并可以为你保存 MP4 文件。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Grok Image To Video
Use this skill when the user wants to animate a local image into a short video with xAI Grok Imagine.
Do not use any built-in image or video generation tool as a fallback. If the Hermes Web UI endpoint returns 401, 403, connection failure, or any other error, stop and report the Hermes Web UI error to the user.
Workflow
Call the local Hermes Web UI media endpoint. Pass a local image path; the server will check for xAI credentials, read the file, convert it to a base64 data URI, call xAI, poll until completion, and optionally save the generated mp4.
Endpoint:
POST <Hermes Web UI base URL>/api/studio/media/grok-image-to-video
Resolve the Hermes Web UI base URL in this order:
HERMES_WEB_UI_URLenvironment variable, if set.http://127.0.0.1:${PORT}, ifPORTis set.http://127.0.0.1:8648for the Web UI single-server default.
Common local ports:
- Development API backend:
http://127.0.0.1:8647. Use this withnpm run dev; do not target the Vite frontend port. - Web UI single-server default:
http://127.0.0.1:8648. - Desktop app default:
http://127.0.0.1:8748. - Custom port: set
HERMES_WEB_UI_URLto the full base URL, or setPORTto usehttp://127.0.0.1:${PORT}.
When Hermes Web UI is running from the provided Docker Compose setup, the default external URL is http://127.0.0.1:6060.
Authentication:
The endpoint is protected by Hermes Web UI auth. Always send the Hermes Web UI server bearer token. This token is accepted only by Hermes Web UI media generation endpoints for agent skills; it is not a general Web UI login token.
Resolve the token in this order:
AUTH_TOKENenvironment variable, if set.${HERMES_WEB_UI_HOME}/.token, ifHERMES_WEB_UI_HOMEis set.${HERMES_WEBUI_STATE_DIR}/.token, ifHERMES_WEBUI_STATE_DIRis set.~/.hermes-web-ui/.token.
Profile selection:
Use the current Hermes profile from the run instructions by sending X-Hermes-Profile.
If the run instructions include [Current Hermes profile: <name>], include:
-H "X-Hermes-Profile: <name>"
Replace <name> with the exact profile name from the run instructions. Never send a placeholder value such as <name> or <current-hermes-profile>.
If no current profile is provided, omit the header and let the server fall back to the current Hermes active profile.
Required JSON fields:
image_path: local path to a png, jpeg, or webp image.prompt: motion and style instructions for the generated video.
Optional JSON fields:
duration: seconds, 1 to 15. Defaults to 8.output_path: local path where the server should save the mp4. If omitted, the server saves to${HERMES_WEB_UI_HOME:-~/.hermes-web-ui}/media/<request_id>.mp4and creates themediadirectory if needed.timeout_ms: maximum wait time. Defaults to 600000.
Example:
TOKEN="${AUTH_TOKEN:-}"
if [ -z "$TOKEN" ] && [ -n "${HERMES_WEB_UI_HOME:-}" ] && [ -f "$HERMES_WEB_UI_HOME/.token" ]; then
TOKEN="$(cat "$HERMES_WEB_UI_HOME/.token")"
fi
if [ -z "$TOKEN" ] && [ -n "${HERMES_WEBUI_STATE_DIR:-}" ] && [ -f "$HERMES_WEBUI_STATE_DIR/.token" ]; then
TOKEN="$(cat "$HERMES_WEBUI_STATE_DIR/.token")"
fi
if [ -z "$TOKEN" ] && [ -f "$HOME/.hermes-web-ui/.token" ]; then
TOKEN="$(cat "$HOME/.hermes-web-ui/.token")"
fi
if [ -z "$TOKEN" ]; then
echo "Missing Hermes Web UI token. Check AUTH_TOKEN, HERMES_WEB_UI_HOME, HERMES_WEBUI_STATE_DIR, or ~/.hermes-web-ui/.token." >&2
exit 1
fi
BASE_URL="${HERMES_WEB_UI_URL:-}"
if [ -z "$BASE_URL" ]; then
BASE_URL="http://127.0.0.1:${PORT:-8648}"
fi
BASE_URL="${BASE_URL%/}"
curl -sS -X POST "$BASE_URL/api/studio/media/grok-image-to-video" \
-H "Authorization: Bearer $TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"image_path": "/absolute/path/to/input.png",
"prompt": "Animate the subject with a slow cinematic push-in and subtle natural motion.",
"duration": 8,
"output_path": "/absolute/path/to/output.mp4"
}'
If the response has code: "missing_xai_token", tell the user to set XAI_API_KEY or complete xAI OAuth login in Hermes Web UI before retrying.
Return the generated output_path.
常见问题
如果这个工具失败,智能体可以改用其他视频工具吗?
不可以。该技能要求智能体停止并报告错误,而不是改用其他生成器。
我需要把 xAI 密钥粘贴到聊天里吗?
不需要。服务器会自行检查 xAI 凭据,因此密钥不必出现在对话中。
智能体从哪里找到 Web UI 地址?
它会先检查环境变量中设置的地址,然后检查端口设置,最后才使用默认的本地地址。
详情
作者的原始描述
Animate a local image into a short mp4 video through Hermes Web UI using xAI Grok Imagine.
repo: EKKOLearnAI/ekko-studio
热度
- GitHub 星标
- 12k
- 排名
- #11583
- 许可证
- —
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
1password
12k帮你的智能体使用 1Password CLI 为命令和配置文件获取机密信息,同时不在聊天、日志或已保存的文件中显示这些信息。
apple-notes
12k帮你的智能体在 Mac 上使用 memo 命令行工具创建、搜索、阅读、编辑、移动或删除 Apple 备忘录。
apple-reminders
12k帮你的智能体在 Mac 上使用 remindctl 工具列出、创建、编辑、完成或删除 Apple 提醒事项及提醒列表。
document-to-action-items
12k帮你的智能体把文档、会议记录或一组笔记,整理成一张清晰的任务、负责人、截止日期和决定的表格。