Communitygithub.com

HiAPI 产品代言视频

通过 HiAPI 在本地生成产品代言人、品牌介绍和广告出镜视频。适用于合成主持人、经授权的人物肖像出镜视频、产品介绍或基于产品和品牌参考图的品牌宣传。

HiAPI 产品代言视频 是什么?

该技能通过本地 CLI 工具,利用 HiAPI 接口生成 3 至 15 秒的单镜头产品视频。它根据场景自动路由到不同模型:合成代言人使用 Kling 3.0 Omni 文生视频,人物出镜使用 Kling 3.0 Omni 图生视频,产品介绍和品牌宣传则使用 Seedance 2.0 Fast。技能内置了预算保护机制,要求先执行 `--dry-run` 进行成本估算,并获得用户明确批准后才能发起付费请求。它支持指定时长、多张参考图片、对话文本,并确保提交的幂等性和失败后的恢复机制。生成的视频会以标准包形式保存到 `outputs/` 目录,包含最终视频、字幕、配置和待人工审核的质量检查文件。该技能适用于 Claude Code、Cursor 等 AI Agent 平台,通过本地命令行调用,适合需要快速、批量或定制化产品视频的开发者。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/HiAPIAI/hiapi-product-video-skills/tree/main/skills/product-spokesperson

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

HiAPI 产品代言视频 是做什么的?

使用本地 CLI 创建 3-15 秒的单镜头产品视频。在发起付费请求之前始终使用 --dry-run 进行估算。仅在用户明确批准生成且命令包含 --spend 时创建付费任务。

路由场景

请选择恰好一个场景:

场景模型必需输入P0 默认值
synthetic-spokespersonkling-3.0-omni/text-to-video提示词和可选对话3秒, 720p, 9:16, 音频
talking-headkling-3.0-omni/image-to-video一张经授权的人物图像、提示词、对话、同意确认3秒, 720p, 音频
product-introseedance-2.0-fast提示词和 1-9 张产品图片4秒, 480p, 9:16, 音频
brand-promoseedance-2.0-fast提示词和 1-9 张品牌或产品图片4秒, 480p, 9:16, 音频

在构建请求之前,请确认目标时长。如果用户未指定,请询问视频时长应为多少秒,并说明支持范围:Kling 3-15秒;Seedance 4-15秒。提供表格中的 P0 默认值,但在用户选择时长或明确接受默认值之前,不要进入 --dry-run 阶段。

拒绝生成 talking-head,除非用户确认授权且命令包含 --consent-confirmed。不要编造产品声明、代言、价格、认证或品牌事实。

保护费用与密钥

首先执行零成本检查:

node scripts/hiapi-product-spokesperson-video.mjs --check --env-file "D:\path\to\.env.local"

然后用 --dry-run 运行预期请求。在将 --dry-run 替换为 --spend 之前,确认公开定价估算在用户预算范围内。默认客户端估算限制为 $0.50;仅在用户明确批准的预算内才能覆盖此限制。每次调用最多创建一个付费任务。

请将此视为估算防护,而非服务端强制执行的最终费用上限。HiAPI 可能会在任务预扣费时应用账户特定的分组比率。在任务 API 支持服务端最大成本字段之前,请在付费生成前披露此限制,并在用户总预算内保持足够的余量。

从进程环境或 --env-file 读取 HIAPI_API_KEY。切勿打印、返回、持久化或在预览、工件、清单、错误或日志中包含该密钥。P0 中使用临时存储。

安装后,将 .env.example 复制到被忽略的 .env 中,或将 --env-file 指向已有的被忽略的环境文件。切勿提交包含密钥的文件。从预览和保存的请求工件中遮蔽嵌入的图像数据和远程图像 URL。

本地运行

估算一个无需付费的授权人物出镜请求:

node scripts/hiapi-product-spokesperson-video.mjs `
  --scenario talking-head `
  --image-file "D:\media\authorized-person.jpg" `
  --prompt "固定镜头,自然眼神交流,克制动作" `
  --dialogue "新产品,现已上市。" `
  --consent-confirmed `
  --env-file "D:\path\to\.env.local" `
  --max-cost-usd 0.50 `
  --dry-run

对于 synthetic-spokesperson,省略图像和同意选项。对于产品和品牌场景,重复使用 --reference-image-file 或 --reference-image-url。本地 JPEG、PNG 和 WebP 文件会转换为 data URI,每个文件不得超过 20 MiB。

无需再次付费即可恢复

CLI 在提交前输出幂等键,并在创建后立即输出任务 ID。如果在任务 ID 返回前提交被中断,请使用相同的 --idempotency-key 重试。如果在创建后轮询被中断,只需运行 --task-id ID、--env-file 和所需的 --output-dir。这将恢复轮询并下载现有结果,而无需重建或重新提交原始请求。

保留输出包

每次成功运行的结果写入 outputs/ 目录,除非提供了 --output-dir。保留以下文件:

  • final.mp4;
  • script.md 和 captions.srt;
  • prompt.json(遮蔽嵌入式媒体和远程图像 URL);
  • manifest.json(包含场景、模型、任务 ID、状态、估算、请求哈希、存储、时间戳和过期时间);
  • qc.json(标记为待人工审核语音、唇形同步、一致性、连续性和声明的准确性)。

在没有终端成功状态和可用的本地视频之前,切勿声称成功。

处理失败

  • 不要重试 HTTP 400、401、402 或 403。
  • 最多重试三次 HTTP 409、429 或 503 提交错误,使用原始的幂等键。
  • 使用 --task-id 恢复中断的轮询;切勿自动提交替换请求。
  • 在没有明确批准再次付费的情况下,不要因质量失败而重新生成。
  • 报告任务 ID、终端状态、估算、本地输出路径和待处理的人工 QC 检查。

Individual skills in this repo

This repo contains 3 individual skills — each has its own dedicated page.

hiapi-fashion-lookbook-video

Plan, preview, price, and generate short single-shot fashion videos through HiAPI. Use for runway walks, one target-outfit transition, editorial lookbook poses, and non-speaking person showcases for clothing brands, fashion creators, and ecommerce sellers. Route text-only briefs to Kling 3.0 Omni text-to-video, one authorized person or complete-look image to Kling image-to-video, and person plus garment/style references to Seedance 2.0 Fast. Do not use for exact virtual try-on or fit guarantees, multi-outfit montages, deterministic motion transfer, talking presenters, captions, logos, CTA compositing, or multi-shot editing.

hiapi-food-commercial-video

Plan, preview, price, and generate single-shot food and beverage commercial videos through HiAPI, with 3-15 second Kling output or 4-15 second Seedance Fast output. Use for coffee pours, beverage splashes, food macro shots, packaged-product hero ads, restaurant atmosphere spots, and ecommerce food promos. Route text-only requests to Kling 3.0 Omni text-to-video, one hero image to Kling image-to-video, and 1-9 reference images to Seedance 2.0 Fast. Do not use for human spokespersons, reference-motion transfer, editing, multi-shot assembly, captions, added logos, or CTA compositing.

hiapi-seedance-2-0-ugc-ad-video-skill

Create source-grounded, real-person or consented synthetic-actor UGC product ads with HiAPI Seedance 2.0 for TikTok and Instagram Reels. Use for ecommerce product trials, unboxings, direct-to-camera demos, creator-style scripts, paid-social variants, 9:16 video generation, or UGC campaign batches that need authentic phone-shot direction, native dialogue, claim controls, and final media QC.

相关技能