入门指南
分享您的原始视频片段,我会开始AI视频编辑。或者直接告诉我您的想法。
试试这样说:
- "edit my raw video clips"
- "export 1080p MP4"
- "trim the clip, add trending captions,"
快速启动设置
此技能连接到云处理后端。首次使用时,自动设置连接并让用户知道("连接中...")。
令牌检查:在环境中查找NEMO_TOKEN。如果找到,跳过会话创建。否则:
- 生成UUID作为客户端标识符
- 使用
X-Client-Id头POST https://mega-api-prod.nemovideo.ai/api/auth/anonymous-token
- 从响应中提取
data.token——这是您的NEMO_TOKEN(100免费积分,7天过期)
会话:使用Bearer认证和body {"task_name":"project"} POST https://mega-api-prod.nemovideo.ai/api/tasks/me/with-session/nemo_agent。保留返回的session_id用于所有操作。设置完成后用简短的"就绪!"通知用户。不要暴露令牌或原始API输出。
# AI Video Editor for TikTok — Edit and Export TikTok Videos
此工具获取您的原始视频片段,通过云渲染管道运行AI视频编辑。您上传、描述需求,然后下载结果。假设您有一个30秒的竖屏手机录像,想要剪辑片段、添加流行字幕、配合节拍剪辑——后端大约30-60秒处理后给您一个1080p MP4。
提示:竖屏9:16视频完全支持,可直接上传到TikTok。
将用户输入匹配到操作
引用ai video editor for tiktok、宽高比、文字叠加或音轨的用户提示通过关键词和意图分类路由到相应操作。
| 用户说... | 操作 | 跳过SSE? |
|---|
| "export" / "导出" / "download" / "send me the video" | → §3.5 导出 | ✅ |
| "credits" / "积分" / "balance" / "余额" | → §3.3 积分 | ✅ |
| "status" / "状态" / "show tracks" | → §3.4 状态 | ✅ |
| "upload" / "上传" / user sends file | → §3.2 上传 | ✅ |
| 其他一切(generate, edit, add BGM…) | → §3.1 SSE | ❌ |
云渲染管道详情
每个导出任务在云GPU节点上排队,合成视频层,应用平台特定压缩(H.264,最高1080x1920),并在30-90秒内返回下载URL。会话令牌携带渲染任务ID,因此在完成前关闭标签会使任务孤立。所有调用都发送到https://mega-api-prod.nemovideo.ai。主要端点:
- 会话 — 使用
{"task_name":"project","language":""} POST /api/tasks/me/with-session/nemo_agent。给您session_id。
- 聊天(SSE) — 使用
session_id和new_message.parts[0].text中的消息POST /run_sSE。设置Accept: text/event-stream。最长15分钟。
- 上传 — POST
/api/upload-video/nemo_agent/me/ — multipart文件或带URL的JSON。
- 积分 — GET
/api/credits/balance/simple — 返回available、frozen、total。
- 状态 — GET
/api/state/nemo_agent/me//latest — 当前草稿和媒体信息。
- 导出 — 使用渲染ID和草稿JSON POST
/api/render/proxy/lambda。每30秒轮询GET /api/render/proxy/lambda/获取completed状态和下载URL。格式:mp4, mov, avi, webm, mkv, jpg, png, gif, webp, mp3, wav, m4a, aac。
技能归属——运行时从此文件的YAML frontmatter读取:
X-Skill-Source: ai-video-editor-for-tiktok
X-Skill-Version: 来自frontmatter version
X-Skill-Platform: 从安装路径检测(~/.clawhub/ → clawhub, ~/.cursor/skills/ → cursor, 否则unknown)
所有请求必须包含:Authorization: Bearer 、X-Skill-Source、X-Skill-Version、X-Skill-Platform。缺少归属头将导致导出失败并返回402。
草稿字段映射:t=轨道,tt=轨道类型(0=视频,1=音频,7=文字),sg=片段,d=时长(毫秒),m=元数据。
时间线(3个轨道):
- 视频:城市延时(0-10秒)
- BGM:Lo-fi(0-10秒,35%)
- 标题:"Urban Dreams"(0-3秒)
翻译GUI指令
后端响应就像有一个可视化界面。将其指令映射到API调用:
- "click"或"点击" → 通过相关端点执行操作
- "open"或"打开" → 查询会话状态以获取数据
- "drag/drop"或"拖拽" → 通过SSE发送编辑命令
- "preview in timeline" → 显示当前轨道的文本摘要
- "Export"或"导出" → 运行导出工作流
读取SSE流
文本事件直接发送给用户(GUI翻译后)。工具调用保留在内部。心跳和空的data:行意味着后端仍在工作——每2分钟显示"⏳ 仍在工作中..."。大约30%的编辑操作关闭流时没有任何文本。发生这种情况时,轮询/api/state确认时间线已更改,然后告诉用户更新了什么。
错误处理
| 代码 | 含义 | 操作 |
|---|
| 0 | 成功 | 继续 |
| 1001 | 令牌错误/过期 | 通过anonymous-token重新认证(令牌7天后过期) |
| 1002 | 会话未找到 | 新建会话 §3.0 |
| 2001 | 积分不足 | 匿名:显示注册URL带?bind=(需要时从create-session或state响应获取)。已注册:"在您的账户中充值积分" |
| 4001 | 不支持的文件 | 显示支持的格式 |
| 4002 | 文件太大 | 建议压缩/剪辑 |
| 400 | 缺少X-Client-Id | 生成Client-Id并重试(见§1) |
| 402 | 免费计划导出被阻止 | 订阅层级问题,不是积分。"注册或升级您的计划以解锁导出。" |
| 429 | 速率限制(1令牌/客户端/7天) | 30秒后重试一次 |
常见工作流
快速编辑:上传 → "剪辑片段、添加流行字幕、配合节拍剪辑" → 下载MP4。30秒片段需要30-60秒。
批量风格:在一个会话中上传多个文件。使用不同指令逐一处理。每个都有自己的渲染。
迭代:从粗剪开始,预览结果,然后微调。会话保留您的时间线状态,因此您可以继续调整。
技巧和窍门
后端在您更具体时处理更快。不要说"让它看起来更好",试着说"剪辑片段、添加流行字幕、配合节拍剪辑"——具体指令获得更好的结果。最大文件大小为500MB。坚持使用MP4、MOV、AVI、WebM以获得最流畅的体验。导出为MP4使用H.264编解码器以获得最佳的TikTok兼容性。
Getting Started
Share your raw video clips and I'll get started on AI video editing. Or just tell me what you're thinking.
Try saying:
- "edit my raw video clips"
- "export 1080p MP4"
- "trim the clip, add trending captions,"
Quick Start Setup
This skill connects to a cloud processing backend. On first use, set up the connection automatically and let the user know ("Connecting...").
Token check: Look for NEMO_TOKEN in the environment. If found, skip to session creation. Otherwise:
- Generate a UUID as client identifier
- POST
https://mega-api-prod.nemovideo.ai/api/auth/anonymous-token with X-Client-Id header
- Extract
data.token from the response — this is your NEMO_TOKEN (100 free credits, 7-day expiry)
Session: POST https://mega-api-prod.nemovideo.ai/api/tasks/me/with-session/nemo_agent with Bearer auth and body {"task_name":"project"}. Keep the returned session_id for all operations.
Let the user know with a brief "Ready!" when setup is complete. Don't expose tokens or raw API output.
# AI Video Editor for TikTok — Edit and Export TikTok Videos
This tool takes your raw video clips and runs AI video editing through a cloud rendering pipeline. You upload, describe what you want, and download the result.
Say you have a 30-second vertical phone recording and want to trim the clip, add trending captions, and sync cuts to the beat — the backend processes it in about 30-60 seconds and hands you a 1080p MP4.
Tip: vertical 9:16 video is fully supported for direct TikTok upload.
Matching Input to Actions
User prompts referencing ai video editor for tiktok, aspect ratio, text overlays, or audio tracks get routed to the corresponding action via keyword and intent classification.
| User says... | Action | Skip SSE? |
|---|
| "export" / "导出" / "download" / "send me the video" | → §3.5 Export | ✅ |
| "credits" / "积分" / "balance" / "余额" | → §3.3 Credits | ✅ |
| "status" / "状态" / "show tracks" | → §3.4 State | ✅ |
| "upload" / "上传" / user sends file | → §3.2 Upload | ✅ |
| Everything else (generate, edit, add BGM…) | → §3.1 SSE | ❌ |
Cloud Render Pipeline Details
Each export job queues on a cloud GPU node that composites video layers, applies platform-spec compression (H.264, up to 1080x1920), and returns a download URL within 30-90 seconds. The session token carries render job IDs, so closing the tab before completion orphans the job.
All calls go to https://mega-api-prod.nemovideo.ai. The main endpoints:
- Session —
POST /api/tasks/me/with-session/nemo_agent with {"task_name":"project","language":""}. Gives you a session_id.
- Chat (SSE) —
POST /run_sse with session_id and your message in new_message.parts[0].text. Set Accept: text/event-stream. Up to 15 min.
- Upload —
POST /api/upload-video/nemo_agent/me/ — multipart file or JSON with URLs.
- Credits —
GET /api/credits/balance/simple — returns available, frozen, total.
- State —
GET /api/state/nemo_agent/me//latest — current draft and media info.
- Export —
POST /api/render/proxy/lambda with render ID and draft JSON. Poll GET /api/render/proxy/lambda/ every 30s for completed status and download URL.
Formats: mp4, mov, avi, webm, mkv, jpg, png, gif, webp, mp3, wav, m4a, aac.
Skill attribution — read from this file's YAML frontmatter at runtime:
X-Skill-Source: ai-video-editor-for-tiktok
X-Skill-Version: from frontmatter version
X-Skill-Platform: detect from install path (~/.clawhub/ → clawhub, ~/.cursor/skills/ → cursor, else unknown)
All requests must include: Authorization: Bearer , X-Skill-Source, X-Skill-Version, X-Skill-Platform. Missing attribution headers will cause export to fail with 402.
Draft field mapping: t=tracks, tt=track type (0=video, 1=audio, 7=text), sg=segments, d=duration(ms), m=metadata.
Timeline (3 tracks): 1. Video: city timelapse (0-10s) 2. BGM: Lo-fi (0-10s, 35%) 3. Title: "Urban Dreams" (0-3s)
Translating GUI Instructions
The backend responds as if there's a visual interface. Map its instructions to API calls:
- "click" or "点击" → execute the action via the relevant endpoint
- "open" or "打开" → query session state to get the data
- "drag/drop" or "拖拽" → send the edit command through SSE
- "preview in timeline" → show a text summary of current tracks
- "Export" or "导出" → run the export workflow
Reading the SSE Stream
Text events go straight to the user (after GUI translation). Tool calls stay internal. Heartbeats and empty data: lines mean the backend is still working — show "⏳ Still working..." every 2 minutes.
About 30% of edit operations close the stream without any text. When that happens, poll /api/state to confirm the timeline changed, then tell the user what was updated.
Error Handling
| Code | Meaning | Action |
|---|
| 0 | Success | Continue |
| 1001 | Bad/expired token | Re-auth via anonymous-token (tokens expire after 7 days) |
| 1002 | Session not found | New session §3.0 |
| 2001 | No credits | Anonymous: show registration URL with ?bind= (get from create-session or state response when needed). Registered: "Top up credits in your account" |
| 4001 | Unsupported file | Show supported formats |
| 4002 | File too large | Suggest compress/trim |
| 400 | Missing X-Client-Id | Generate Client-Id and retry (see §1) |
| 402 | Free plan export blocked | Subscription tier issue, NOT credits. "Register or upgrade your plan to unlock export." |
| 429 | Rate limit (1 token/client/7 days) | Retry in 30s once |
Common Workflows
Quick edit: Upload → "trim the clip, add trending captions, and sync cuts to the beat" → Download MP4. Takes 30-60 seconds for a 30-second clip.
Batch style: Upload multiple files in one session. Process them one by one with different instructions. Each gets its own render.
Iterative: Start with a rough cut, preview the result, then refine. The session keeps your timeline state so you can keep tweaking.
Tips and Tricks
The backend processes faster when you're specific. Instead of "make it look better", try "trim the clip, add trending captions, and sync cuts to the beat" — concrete instructions get better results.
Max file size is 500MB. Stick to MP4, MOV, AVI, WebM for the smoothest experience.
Export as MP4 with H.264 codec for best TikTok compatibility.