RenderingVideo Preview Assistant
Use this skill when the task only needs the public temporary preview flow.
Read This First
- - Read
https://renderingvideo.com/docs/api-and-usage.md before calling the public preview endpoints. - Read
https://renderingvideo.com/docs/json-spec.md before drafting or changing schema JSON. - Read
https://renderingvideo.com/docs/clips.md, https://renderingvideo.com/docs/elements.md, and https://renderingvideo.com/docs/elements/base-clip.md when choosing clip types or fields. - Read
https://renderingvideo.com/docs/animation-and-timing.md when the task changes timing, transitions, or animations.
Enforce These Rules
- - Use
POST /api/preview for preview creation. - Send the schema itself as the request body. Do not wrap it in
{ "config": ... }. - Do not require or send an API key for this skill.
- Treat the returned preview link as temporary and expiring in 7 days.
- Do not guess fields or routes from memory when
api-and-usage.md covers them.
Run The Script
Use the bundled script:
CODEBLOCK0
Endpoint Mapping
- -
gen-preview.cjs: INLINECODE10 - Playback URLs:
/t/:id or INLINECODE12 - Readback endpoint: INLINECODE13
Follow This Workflow
- 1. Read
json-spec.md, clips.md, and the relevant element page. - Draft or update the schema JSON.
- Run
scripts/gen-preview.cjs to create a temporary preview. - Return the preview URL and temp identifier to the user.
- If the preview is wrong, revise the schema and generate a new preview.
Keep These API Rules
- - The preview body is the full schema JSON.
- Missing top-level
meta or tracks should be treated as invalid input. - The returned preview page is shareable but temporary.
- Prefer
viewerUrl when present. Fall back to url if needed. - Reuse returned
tempId, viewerUrl, url, and expiresIn instead of guessing routes.
Return These Fields
- - Return
tempId, viewerUrl, url, and expiresIn when present. - Return the full absolute preview URL, not only the relative path.
- If the script or API returns validation failure details, preserve them.
Handle Failures Explicitly
- - If the API returns a non-2xx response, surface the HTTP status and response body.
- If JSON parsing fails locally, report that the input file is invalid JSON.
- If the preview expires or becomes invalid later, tell the user to generate a new preview.
技能名称:renderingvideo-generator
详细描述:
渲染视频预览助手
当任务仅需公共临时预览流程时使用此技能。
请先阅读
- - 调用公共预览端点前,请先阅读 https://renderingvideo.com/docs/api-and-usage.md。
- 起草或修改 schema JSON 前,请先阅读 https://renderingvideo.com/docs/json-spec.md。
- 选择剪辑类型或字段时,请阅读 https://renderingvideo.com/docs/clips.md、https://renderingvideo.com/docs/elements.md 和 https://renderingvideo.com/docs/elements/base-clip.md。
- 当任务涉及时间、转场或动画调整时,请阅读 https://renderingvideo.com/docs/animation-and-timing.md。
强制执行以下规则
- - 使用 POST /api/preview 创建预览。
- 将 schema 本身作为请求体发送,不要用 { config: ... } 包裹。
- 此技能无需提供或发送 API 密钥。
- 返回的预览链接为临时链接,7 天后过期。
- 当 api-and-usage.md 已涵盖字段或路由时,不要凭记忆猜测。
运行脚本
使用内置脚本:
bash
node ./scripts/gen-preview.cjs [json文件路径]
端点映射
- - gen-preview.cjs:POST https://video.renderingvideo.com/api/preview
- 播放 URL:/t/:id 或 /preview/:id
- 回读端点:GET /api/temp/:id
遵循此工作流程
- 1. 阅读 json-spec.md、clips.md 及相关元素页面。
- 起草或更新 schema JSON。
- 运行 scripts/gen-preview.cjs 创建临时预览。
- 将预览 URL 和临时标识符返回给用户。
- 如果预览有误,修改 schema 并生成新预览。
遵守这些 API 规则
- - 预览请求体为完整的 schema JSON。
- 缺少顶层 meta 或 tracks 应视为无效输入。
- 返回的预览页面可分享,但为临时性质。
- 优先使用 viewerUrl,必要时回退到 url。
- 复用返回的 tempId、viewerUrl、url 和 expiresIn,不要猜测路由。
返回这些字段
- - 返回存在的 tempId、viewerUrl、url 和 expiresIn。
- 返回完整的绝对预览 URL,而非仅相对路径。
- 如果脚本或 API 返回验证失败详情,请保留这些信息。
明确处理失败情况
- - 如果 API 返回非 2xx 响应,请显示 HTTP 状态码和响应体。
- 如果本地 JSON 解析失败,报告输入文件为无效 JSON。
- 如果预览后续过期或失效,告知用户生成新预览。