mcpField
A
agnes-free-video

agnes-free-video

github.com/kangarooking创意与媒体20098 次安装21 周前更新
代码仓库

关于 agnes-free-video

Agnes Free Video 技能通过 agnes-video-v2.0 提交并查询异步视频生成任务。其脚本支持文本、图像、多图和关键帧输入,并可下载任务结果。

主要功能

  1. 01文本生成视频
  2. 02图像生成视频
  3. 03多图与关键帧模式
  4. 04异步任务状态查询
  5. 05请求格式试运行验证

适用场景

  1. 01根据文字提示生成视频
  2. 02为产品图像制作动画
  3. 03生成关键帧之间的转场
  4. 04查询并下载已提交的任务

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/kangarooking/agnes-free-model-skills --skill agnes-free-video

安装后在 Claude Code 中输入/agnes-free-video确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

agents/
openai.yaml
references/
api.md
scripts/
agnes_video.py

详细介绍

Agnes Free Video

使用此技能通过 agnes-video-v2.0 创建并轮询异步视频生成任务。

凭据规则

从环境中读取 API 密钥。请勿将密钥硬编码到提示词、脚本、技能文件、提交内容或 shell 历史记录中。

首选变量:

export AGNES_API_KEY="..."

此辅助工具也接受 AGNES_TOKEN 作为备用变量。

快速开始

文本转视频:

python3 scripts/agnes_video.py create \
  --prompt "A cinematic shot of a cat walking on the beach at sunset, soft ocean waves, warm golden lighting, realistic motion" \
  --width 1152 \
  --height 768 \
  --num-frames 121 \
  --frame-rate 24 \
  --output-dir ./outputs/agnes-free-video

图像转视频:

python3 scripts/agnes_video.py create \
  --prompt "Animate the product with a slow camera push-in, soft studio reflections, stable identity" \
  --image-url "https://example.com/product.png" \
  --num-frames 121 \
  --frame-rate 24

关键帧转场:

python3 scripts/agnes_video.py create \
  --prompt "Create a smooth cinematic transition between the keyframes with natural pacing" \
  --image-url "https://example.com/keyframe1.png" \
  --image-url "https://example.com/keyframe2.png" \
  --mode keyframes \
  --num-frames 121

检查现有任务:

python3 scripts/agnes_video.py status \
  --task-id task_123456 \
  --download \
  --output-dir ./outputs/agnes-free-video

验证请求格式,不调用 API:

python3 scripts/agnes_video.py create \
  --prompt "A short cinematic AI product teaser, slow dolly shot, clean lighting" \
  --num-frames 81 \
  --dry-run

工作流

  1. 确定模式:文本转视频、图像转视频、多图输入或关键帧动画。
  2. 编写提示词,描述主体、动作、场景、镜头运动、光线和风格。
  3. 除非用户对时长有特定要求,否则将 num_frames 设为 81、121、161、241 或 441。
  4. 使用 scripts/agnes_video.py create 提交任务并轮询。若用户已有任务 ID,则使用 status。
  5. video_url 出现后,尽快下载视频。

备注

  • 创建端点:POST https://apihub.agnes-ai.com/v1/videos
  • 状态端点:GET https://apihub.agnes-ai.com/v1/videos/{task_id}
  • 模型:agnes-video-v2.0
  • 视频生成采用异步方式。
  • num_frames 必须 <= 441,且满足 8n + 1。
  • 辅助工具的默认设置为 1152x768、121 帧和 24 FPS。

参考

需要了解请求字段、任务状态值、错误代码或特定模式的提示词示例时,请阅读 references/api.md。

评论

支持 Markdown