360 Secure SkillHub
360 安全技能中心

agnes-ai-generation

该 Skill 提供 Python 命令行脚本调用 Agnes 文本、图像和视频 API,支持提示词、参考图、关键帧、视频轮询、模型目录查询与离线回归测试;需要 API Key,生成请求会发送至外部服务。

分类:创作
Yacey
热度 2.82
最近更新 2026-12-03 05:22:54

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add yacey/agnes-ai-generation-skill/agnes-ai-generation
兼容性
通用兼容
联网要求
需要联网
数据出网
必须出网
Metadata
name
agnes-ai-generation
description
Use when the user requests Agnes AI or Sapiens AI model generation, Agnes API integration or testing, or text, image, or video creation specifically through apihub.agnes-ai.com.

Agnes AI Generation

Call Agnes text, image, and video APIs through scripts/agnes_api.py. Read references/api.md for mode rules, raw HTTP payloads, and official sources. The bundled model snapshot records documentation rather than account access.

Setup and model selection

  • Require AGNES_API_KEY, AGNES_API_TOKEN, or APIHUB_AGNES_API_KEY for live requests. Never print credentials.
  • Use models without a key for the documented catalog. models --live is experimental OpenAI-compatible discovery; a 2026-12-02 live response listed 13 IDs, including retired/deprecated IDs. Discovery does not prove invocation access or override lifecycle notes.
  • If a local IPv6 route causes TLS timeouts, AGNES_FORCE_IPV4=1 opts this script's requests into IPv4. TLS certificate/hostname checks remain enabled; system network settings are unchanged.
  • Defaults: text agnes-3.0-flash, image agnes-image-2.5-flash, video agnes-video-2.5. Each generation command accepts --model.
  • agnes-2.5-flash has an official retirement date of 2026-11-30; the official Quickstart still uses it. Use the current model pages. agnes-2.0-flash is deprecated.
  • agnes-sys1-1.0 is a decision model with a separate /v1/systemone schema; this CLI does not implement it.

Commands

python scripts/agnes_api.py models
python scripts/agnes_api.py text --prompt "Write a concise tagline."
python scripts/agnes_api.py text --model agnes-3.0-pro --prompt "Explain this tradeoff." --stream
python scripts/agnes_api.py image --prompt "A futuristic city at sunrise" --size 2K --ratio 16:9
python scripts/agnes_api.py image --prompt "Change the lighting while preserving composition" --image https://example.com/input.png
python scripts/agnes_api.py video --prompt "A cat walks along the beach, gentle tracking shot" --seconds 5 --size 720P --poll
python scripts/agnes_api.py video --prompt "Animate subtle natural motion" --image https://example.com/input.png --poll
python scripts/agnes_api.py video --mode keyframe --prompt "Smooth transition" --first-frame https://example.com/first.png --last-frame https://example.com/last.png --poll
python scripts/agnes_api.py video --mode reference --prompt "Use <Picture 1> as a character reference" --image https://example.com/input.png --poll
python scripts/agnes_api.py video-get video_123 --id-kind video_id --model-name agnes-video-2.5

Generation decisions

  • Preserve the original prompt by default. --translate-prompt explicitly opts into an additional text-model call; preserve requested text, composition, movement, and constraints. The former --no-translate-prompt flag remains accepted.
  • Image 2.1/2.5 accept 1K, 2K, 3K, 4K plus --ratio. Exact dimensions remain compatible but may be normalized. Image 2.0 defaults to legacy 1024x768. Repeat --image for composition.
  • Video 2.5 uses seconds (4–12) and resolution-tier size. Text/reference modes default to aspect_ratio=16:9; keyframe mode omits it because the live service rejects it. Explicit keyframe --aspect-ratio is rejected locally. Never send old frame counts, frame rates, pixel dimensions, inference steps, or negative prompts to 2.5.
  • A single video --image defaults to first-frame control; multiple images default to reference mode. Select keyframe when an image must be the actual first/last frame, or reference for content/style guidance. Reference mode also accepts repeated --audio and --reference-video; use --videos-json for reference-video options.
  • Video 2.5 Flash accepts only 720P, up to 5 reference images and 3 audios, with no reference videos. Standard 2.5 accepts up to 8 images, 3 audios, and 1 video, at most 12 reference files total.
  • Preserve both returned ID type and selected model when retrieving. Prefer the emitted next_steps or --poll. Use --id-kind video_id when a returned video ID lacks the video_ prefix. --id-kind task_id explicitly selects legacy task lookup.
  • Only explicit --model agnes-video-v2.0 enables old frame-based parameters. Legacy service availability has not been verified. keyframes and ti2vid remain migration aliases for existing commands.

Results and verification

  • Return content or generated urls and retain useful provider errors. Deliver video media when status=completed; failed is an unsuccessful result even without an error object. Do not treat internal status/progress as completion.
  • Return media URLs by default. Download or inspect files when the user requests it. --raw exposes the original provider result.
  • Tool definitions can be sent with text --tools-json and --tool-choice-json. The CLI uses Chat Completions and does not execute tools or continue automatic tool loops. Old Responses failures do not establish current 3.0 behavior.
  • Run python -m unittest discover -s tests -v for offline regression checks. smoke-test sends paid-capable text/image requests; explicit --video-case adds video creation. Use live tests only within the user's authorized scope.
  • The 2026-12-02 live validation record covers passed Flash text/SSE/tool-call structure, Pro text, Image 2.5 generation/editing, and completed playable Flash text-to-video. These simple samples do not establish complex media quality. Standard video hit a quota error; corrected Flash keyframe and image-reference requests hit a full queue and have no confirmed final media. Report those limits without inheriting v0.1.0 claims.