← 返回 Skills 市场
🔌

AI Video

作者 skills-video · GitHub ↗ · v1.0.3 · MIT-0
linuxdarwin ✓ 安全检测通过
160
总下载
0
收藏
1
当前安装
4
版本数
在 OpenClaw 中安装
/install ai-video
功能描述
Build and execute skills.video video generation REST requests from OpenAPI specs. Use when user needs to create, debug, or document video generation calls on...
使用说明 (SKILL.md)

ai-video

Overview

Use this skill to turn OpenAPI definitions into working video-generation API calls for skills.video. Prefer deterministic extraction from openapi.json instead of guessing fields.

Prerequisites

  1. Obtain an API key at: https://skills.video/dashboard/developer
  2. Configure SKILLS_VIDEO_API_KEY before using the skill.

Preferred OpenClaw setup:

  • Open the skill settings for ai-video
  • Add an environment variable named SKILLS_VIDEO_API_KEY
  • Paste the API key as its value

Equivalent config shape:

{
  "skills": {
    "entries": {
      "ai-video": {
        "enabled": true,
        "env": {
          "SKILLS_VIDEO_API_KEY": "your_api_key_here"
        }
      }
    }
  }
}

Other valid ways to provide the key:

  • Shell: export SKILLS_VIDEO_API_KEY="your_api_key_here"
  • Tool-specific env config: any runtime that injects SKILLS_VIDEO_API_KEY

Workflow

  1. Check API key and bootstrap environment on first use.
  2. Identify the active spec.
  3. Select the SSE endpoint pair for a video model.
  4. Extract request schema and generate a payload template.
  5. Execute POST /generation/sse/... as default and keep the stream open.
  6. If SSE does not reach terminal completion, poll GET /generation/{id} to terminal status.
  7. Return only terminal result (COMPLETED/SUCCEEDED/FAILED/CANCELED), never IN_PROGRESS.
  8. Apply retry and failure handling.

0) Check API key (first run)

Run this check before any API call.

python scripts/ensure_api_key.py

If ok is false, tell the user to:

  • Follow the setup in Prerequisites

Example:

export SKILLS_VIDEO_API_KEY="\x3CYOUR_API_KEY>"

1) Identify the spec

Load the most specific OpenAPI first.

  • Prefer model-specific OpenAPI when available (for example /v1/openapi.json under a model namespace).
  • Fall back to platform-level openapi.json.
  • Use references/open-platform-api.md for base URL, auth, and async lifecycle.

2) Select a video endpoint

If docs.json exists, derive video endpoints from the Videos navigation group. Use default_endpoints from the script output as the primary list (SSE first).

python scripts/inspect_openapi.py \
  --openapi /abs/path/to/openapi.json \
  --docs /abs/path/to/docs.json \
  --list-endpoints

When docs.json is unavailable, pass a known endpoint directly (for example /generation/sse/kling-ai/kling-v2.6). Use references/video-model-endpoints.md as a snapshot list.

3) Extract schema and build payload

Inspect endpoint details and generate a request template from required/default fields.

python scripts/inspect_openapi.py \
  --openapi /abs/path/to/openapi.json \
  --endpoint /generation/sse/kling-ai/kling-v2.6 \
  --include-template

Use the returned request_template as the starting point. Do not add fields not defined by the endpoint schema. Use default_create_endpoint from output unless an explicit override is required.

4) Execute SSE request (default) with automatic fallback

Prefer the helper script. It creates via SSE and keeps streaming; if stream ends before terminal completion, it automatically switches to polling fallback.

python scripts/create_and_wait.py \
  --sse-endpoint /generation/sse/kling-ai/kling-v2.6 \
  --payload '{"prompt":"A cinematic dolly shot of neon city rain at night"}' \
  --poll-timeout 900 \
  --poll-interval 3

Treat SSE as the default result channel. Do not finish the task on IN_QUEUE or IN_PROGRESS. Return only after terminal result.

5) Fall back to polling

Use polling only if SSE cannot be established, disconnects early, or does not reach a terminal state. Use GET /generation/{id} (or model-spec equivalent path if the OpenAPI uses /v1/...).

curl -X GET "https://open.skills.video/api/v1/generation/\x3CGENERATION_ID>" \
  -H "Authorization: Bearer $SKILLS_VIDEO_API_KEY"

Stop polling on terminal states:

  • COMPLETED
  • FAILED
  • CANCELED

Recommended helper:

python scripts/wait_generation.py \
  --generation-id \x3CGENERATION_ID> \
  --timeout 900 \
  --interval 3

Return to user only after helper emits event=terminal.

6) Handle errors and retries

Handle these response codes for create, SSE, and fallback poll operations:

  • 400: request format issue
  • 401: missing/invalid API key
  • 402: possible payment/credits issue in runtime
  • 404: endpoint or generation id not found
  • 422: schema validation failed

Classify non-2xx runtime errors with:

python scripts/handle_runtime_error.py \
  --status \x3CHTTP_STATUS> \
  --body '\x3CRAW_ERROR_BODY_JSON_OR_TEXT>'

If category is insufficient_credits, tell the user to recharge:

  • Open https://skills.video/dashboard and go to Billing/Credits
  • Recharge or purchase additional credits
  • Retry after recharge

Optional balance check:

curl -X GET "https://open.skills.video/api/v1/credits" \
  -H "Authorization: Bearer $SKILLS_VIDEO_API_KEY"

Apply retries only for transient conditions (network failure or temporary 5xx). Use bounded exponential backoff (for example 1s, 2s, 4s, max 16s, then fail). Do not retry unchanged payloads after 4xx validation errors.

Rate limits and timeouts

Treat rate limits and server-side timeout windows as unknown unless documented in the active OpenAPI or product docs. If unknown, explicitly note this in output and choose conservative client defaults.

Resources

  • scripts/ensure_api_key.py: validate SKILLS_VIDEO_API_KEY and show first-run setup guidance
  • scripts/handle_runtime_error.py: classify runtime errors and provide recharge guidance for insufficient credits
  • scripts/inspect_openapi.py: extract SSE/polling endpoint pair, contract, and payload template
  • scripts/create_and_wait.py: create via SSE and auto-fallback to polling when stream does not reach terminal status
  • scripts/wait_generation.py: poll generation status until terminal completion and return final response
  • references/open-platform-api.md: SSE-first lifecycle, fallback polling, retry baseline
  • references/video-model-endpoints.md: current video endpoint snapshot from docs.json
安全使用建议
This skill appears to be what it claims: a helper for calling skills.video generation endpoints. Before installing or enabling it: (1) Verify you trust the hostname(s) referenced (open.skills.video / skills.video) and the published repository/homepage if you need source-of-truth assurance. (2) Provide SKILLS_VIDEO_API_KEY via secure secret storage (do not hardcode). (3) Be cautious when supplying file paths to commands (openapi.json, docs.json, payload files): the scripts will read those files and may transmit their contents to the remote API. Do not point the scripts at sensitive files. (4) There is a small coding issue observed in inspect_openapi.py (an undefined variable 'pr' used when assigning a field description) and some files in the supplied listing were truncated; consider reviewing the full script sources from the upstream repository or vendor before use and test in a safe environment. (5) If you want additional assurance, review the repository at the declared link or request a full untruncated source review. If any behavior beyond the documented endpoints or unexpected additional env vars is required, treat that as suspicious and do not enable the skill.
功能分析
Type: OpenClaw Skill Name: ai-video Version: 1.0.3 The ai-video skill bundle is designed to facilitate video generation by interacting with the skills.video REST API. The included Python scripts (create_and_wait.py, wait_generation.py, and inspect_openapi.py) implement standard API interaction patterns, such as handling Server-Sent Events (SSE), polling for task completion, and parsing OpenAPI specifications to generate request templates. The skill correctly manages sensitive data by requiring the SKILLS_VIDEO_API_KEY to be provided via environment variables rather than hardcoding. There is no evidence of data exfiltration, malicious execution, or harmful prompt injection; all operations are aligned with the stated purpose of automating video generation workflows.
能力评估
Purpose & Capability
Name/description, required binaries (python3, curl), and the single required env var (SKILLS_VIDEO_API_KEY) match the skill's stated purpose of building and executing skills.video REST calls. Included helper scripts implement OpenAPI inspection, SSE creation, fallback polling, and error classification — all consistent with the described workflow.
Instruction Scope
The runtime instructions explicitly tell the agent to load OpenAPI/docs JSON and optional payload files from absolute paths and to POST payloads to open.skills.video. That is appropriate for this skill, but it means the agent (via the scripts) will read any local files you point it at and may transmit their contents to the remote API. Users should avoid passing sensitive local files (secrets, private keys, system config) as payload/openapi inputs.
Install Mechanism
No install spec is present (instruction-only with included scripts), so nothing is downloaded or executed at install time. Runtime requires only python3 and curl which are reasonable for the scripts provided.
Credentials
Only one credential (SKILLS_VIDEO_API_KEY) is required and is the declared primary credential — appropriate and proportional for a service client. The scripts do not access other environment variables or unrelated secrets.
Persistence & Privilege
Skill is not forced-always (always:false) and does not request system-wide config or write other skills' settings. It runs as a user-invokable skill and uses no privileged persistence mechanisms.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install ai-video
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /ai-video 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.3
- Added MIT license information and author metadata. - Declared supported operating systems (linux, darwin) and required binaries (python3, curl). - Included links to repository and homepage. - Enhanced OpenClaw environment configuration details and CLI help in metadata. - No logic or workflow changes to the skill instructions.
v1.0.2
- Added a "Prerequisites" section with clear instructions for obtaining and configuring the required API key. - Updated API key setup guidance to include preferred OpenClaw environment variable method and JSON config example. - Streamlined initial API key check to reference the new "Prerequisites" section for setup steps. - Enhanced documentation on alternative API key provisioning methods (shell, tool-specific env config). - No changes were made to logic, workflow, or endpoints; update is focused on configuration clarity.
v1.0.1
- Renamed the skill from "video-generation" to "ai-video". - No changes to code or functionality; documentation only. - Updated all references to reflect the new skill name.
v1.0.0
Initial release of the ai-video (video-generation) skill. - Automates construction and execution of video generation API calls using OpenAPI specs for `skills.video`. - Follows a robust workflow: verifies API key, identifies correct spec, selects best endpoint, generates payload, sends SSE requests, and falls back to polling as needed. - Returns only terminal job results (e.g., COMPLETED, FAILED) and never intermediate statuses. - Provides clear diagnostics and retry logic for errors; guides user on issues related to authorization or credits. - Includes helper scripts for endpoint discovery, schema extraction, request execution, error handling, and status polling.
元数据
Slug ai-video
版本 1.0.3
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 4
常见问题

AI Video 是什么?

Build and execute skills.video video generation REST requests from OpenAPI specs. Use when user needs to create, debug, or document video generation calls on... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 160 次。

如何安装 AI Video?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install ai-video」即可一键安装,无需额外配置。

AI Video 是免费的吗?

是的,AI Video 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

AI Video 支持哪些平台?

AI Video 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(linux, darwin)。

谁开发了 AI Video?

由 skills-video(@skills-video)开发并维护,当前版本 v1.0.3。

💬 留言讨论