agentsclimarketplace

Agnes video

Skill xiongxianzhu/xskills/skills/agnes-video

使用 Agnes-Video-V2.0(Sapiens AI)生成视频,支持文生视频、图生视频、多图视频与关键帧动画;异步任务式(先建任务再取结果)。当用户要求用 Agnes / agnes-video 生成视频、图片转视频、关键帧过渡、营销短片 / Reels 时使用。From its SKILL.md

Install
npx -y skills add xiongxianzhu/xskills --skill agnes-video

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

3.5 KB, ~1.1k tokens by cl100k_base, as published. Nobody here has run it

Agnes 生视频(agnes-video)

调用 Agnes-Video-V2.0 生成视频。该接口为异步:先 POST 建任务拿到 video_id,再轮询取结果,完成后视频地址在 remixed_from_video_id。优先执行 scripts/generate.py(已封装建任务、轮询、下载、帧数校验)。完整接口见 references/api.md

前置

  • 环境变量 AGNES_API_KEYAuthorization: Bearer <key>);公开示例一律用 YOUR_API_KEY写入真实 key。
  • 图生视频 / 多图 / 关键帧的输入图必须是公网可访问的 HTTPS URL(无需登录/cookie);不支持本地文件。

工作流程

  1. 与用户确认:prompt、时长(或 num_frames+fps)、分辨率、输出路径;图生视频还需输入图 URL 与「动什么、保持什么」。
  2. 选模式(脚本自动判断):无图=文生视频;单图=图生视频;多图=多图视频;--mode keyframes=关键帧动画。
  3. 生成(建任务→轮询→下载 mp4):
# 文生视频(约 5 秒:num_frames 121 / fps 24)
python scripts/generate.py \
  --prompt "A cinematic shot of a cat walking on the beach at sunset, warm golden lighting, realistic motion" \
  --frames 121 --fps 24 --width 1152 --height 768 \
  --out out/cat.mp4

# 图生视频
python scripts/generate.py \
  --prompt "The woman slowly turns and looks back, natural expression, cinematic camera movement" \
  --image https://example.com/image.png \
  --out out/turn.mp4

# 关键帧动画(两张及以上)
python scripts/generate.py \
  --prompt "Smooth cinematic transition between the keyframes, consistent identity, natural motion" \
  --image https://example.com/k1.png --image https://example.com/k2.png \
  --mode keyframes \
  --out out/transition.mp4
  1. 失败时按 references/api.md 「错误码」排查(401 查 key;400 查参数,尤其 num_frames;503 稍后重试)。

关键约束(务必遵守)

  • 模型名固定 agnes-video-v2.0
  • 时长seconds = num_frames / frame_ratenum_frames ≤ 441 且须满足 8n+1(如 81 / 121 / 161 / 241 / 441);frame_rate1–60
  • 图位置:单图图生视频用顶层 image;多图与关键帧用 extra_body.image;关键帧再加 extra_body.mode: "keyframes"
  • 文生视频仅需 modelprompt
  • 取结果优先用 video_id(端点 GET /agnesapi?video_id=...),完成后地址字段为 remixed_from_video_id

常用时长

目标时长参数
~3snum_frames 81, fps 24
~5snum_frames 121, fps 24
~10snum_frames 241, fps 24
~18snum_frames 441, fps 24

prompt 结构

文生视频:[主体] + [动作] + [场景] + [运镜] + [光照] + [风格]。 图/多图/关键帧:说明「动什么、保持什么」「起始→目标如何过渡」。

脚本

scripts/generate.py:建任务 + 轮询 + 下载,零第三方依赖(标准库)。读取 AGNES_API_KEY--out.mp4 本地路径;可选 --seed--negative--poll-interval--timeout。帧数不合法会直接报错并提示就近的合法值。

What ships with it: 2 files

9.8 KB alongside SKILL.md, 1 of them executable

references/

scripts/

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.