Getting Started
Send me your video clips and I'll generate it. No file? Just describe what you need.
Try saying:
- - "generate a 60-second travel montage video into a 1080p MP4"
- "generate a free background music track that matches the mood of my video"
- "adding AI-generated background music to videos for content creators"
Automatic Setup
On first interaction, connect to the processing API before doing anything else. Show a brief status like "Setting things up...".
Token: If NEMO_TOKEN environment variable is already set, use it and skip to Session below.
Free token: Generate a UUID as client identifier, then POST to https://mega-api-prod.nemovideo.ai/api/auth/anonymous-token with header X-Client-Id: <uuid>. The response field data.token becomes your NEMO_TOKEN (100 credits, 7-day expiry).
Session: POST to https://mega-api-prod.nemovideo.ai/api/tasks/me/with-session/nemo_agent with Bearer auth and body {"task_name":"project"}. Save session_id from the response.
Confirm to the user you're connected and ready. Don't print tokens or raw JSON.
Generate Video Clips Into Music-Backed Videos
This does AI music generation for video clips. Everything runs server-side.
A quick walkthrough: upload a 60-second travel montage video → ask for generate a free background music track that matches the mood of my video → wait roughly 20-40 seconds → download your MP4 at 1080p. The backend handles rendering, encoding, all of it.
Fair warning — shorter videos get matched music faster and more accurately.
Sorting Your Requests
The skill checks your message against a few patterns and routes it to the right handler.
| 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 | ❌ |
How It Works Internally
Everything happens on cloud infrastructure. Your ai music generator free ab old job gets queued, rendered on GPU nodes, and the finished file comes back as a download link.
Base URL: https://mega-api-prod.nemovideo.ai
| Endpoint | Method | Purpose |
|---|
| INLINECODE8 | POST | Start a new editing session. Body: {"task_name":"project","language":"<lang>"}. Returns session_id. |
| INLINECODE11 |
POST | Send a user message. Body includes
app_name,
session_id,
new_message. Stream response with
Accept: text/event-stream. Timeout: 15 min. |
|
/api/upload-video/nemo_agent/me/<sid> | POST | Upload a file (multipart) or URL. |
|
/api/credits/balance/simple | GET | Check remaining credits (
available,
frozen,
total). |
|
/api/state/nemo_agent/me/<sid>/latest | GET | Fetch current timeline state (
draft,
video_infos,
generated_media). |
|
/api/render/proxy/lambda | POST | Start export. Body:
{"id":"render_<ts>","sessionId":"<sid>","draft":<json>,"output":{"format":"mp4","quality":"high"}}. Poll status every 30s. |
Accepted file types: 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: INLINECODE28 - INLINECODE29 : from frontmatter INLINECODE30
- INLINECODE31 : detect from install path (
~/.clawhub/ → clawhub, ~/.cursor/skills/ → cursor, else unknown)
Include Authorization: Bearer <NEMO_TOKEN> and all attribution headers on every request — omitting them triggers a 402 on export.
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=<id> (get
<id> 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 |
SSE Event Handling
| Event | Action |
|---|
| Text response | Apply GUI translation (§4), present to user |
| Tool call/result |
Process internally, don't forward |
|
heartbeat / empty
data: | Keep waiting. Every 2 min: "⏳ Still working..." |
| Stream closes | Process final response |
~30% of editing operations return no text in the SSE stream. When this happens: poll session state to verify the edit was applied, then summarize changes to the user.
Backend Response Translation
The backend assumes a GUI exists. Translate these into API actions:
| Backend says | You do |
|---|
| "click [button]" / "点击" | Execute via API |
| "open [panel]" / "打开" |
Query session state |
| "drag/drop" / "拖拽" | Send edit via SSE |
| "preview in timeline" | Show track summary |
| "Export button" / "导出" | Execute export workflow |
Draft field mapping: t=tracks, tt=track type (0=video, 1=audio, 7=text), sg=segments, d=duration(ms), m=metadata.
CODEBLOCK0
Common Workflows
From scratch: Describe what you want and the AI generates a draft. You refine from there.
Polish existing content: Upload your video clips, ask for specific changes — generate a free background music track that matches the mood of my video, adjust colors, swap music. The backend handles rendering.
Export ready: Once you're happy, export at 1080p in MP4. File lands in your downloads.
Tips and Tricks
The backend processes faster when you're specific. Instead of "make it look better", try "generate a free background music track that matches the mood of my video" — concrete instructions get better results.
Max file size is 500MB. Stick to MP4, MOV, AVI, WebM for the smoothest experience.
Export as MP4 for widest compatibility.
开始使用
发送您的视频片段,我将为您生成。没有文件?只需描述您的需求。
尝试说:
- - 生成一个60秒的旅行混剪视频,输出1080p MP4格式
- 生成一段与我的视频情绪匹配的免费背景音乐
- 为内容创作者在视频中添加AI生成的背景音乐
自动设置
首次交互时,先连接处理API再执行其他操作。显示简短状态如正在设置...
令牌:如果已设置NEMO_TOKEN环境变量,直接使用并跳至下方会话。
免费令牌:生成UUID作为客户端标识,然后向https://mega-api-prod.nemovideo.ai/api/auth/anonymous-token发送POST请求,附带请求头X-Client-Id: 。响应字段data.token即为您的NEMO_TOKEN(100积分,7天有效期)。
会话:向https://mega-api-prod.nemovideo.ai/api/tasks/me/with-session/nemoagent发送POST请求,使用Bearer认证,请求体为{taskname:project}。保存响应中的session_id。
向用户确认已连接就绪。不要打印令牌或原始JSON。
将视频片段生成为带背景音乐的视频
此功能为视频片段提供AI音乐生成。所有处理均在服务端完成。
快速演示:上传60秒旅行混剪视频 → 要求生成一段与视频情绪匹配的免费背景音乐 → 等待约20-40秒 → 下载1080p MP4文件。后端负责渲染、编码等全部流程。
温馨提示——较短的视频能更快、更准确地匹配音乐。
请求分类
此技能会根据您的消息模式进行判断,并路由到相应的处理程序。
| 用户输入... | 操作 | 跳过SSE? |
|---|
| export / 导出 / download / send me the video | → §3.5 导出 | ✅ |
| credits / 积分 / balance / 余额 |
→ §3.3 积分 | ✅ |
| status / 状态 / show tracks | → §3.4 状态 | ✅ |
| upload / 上传 / 用户发送文件 | → §3.2 上传 | ✅ |
| 其他所有内容(生成、编辑、添加背景音乐等) | → §3.1 SSE | ❌ |
内部工作原理
所有操作均在云端基础设施上完成。您的ai-music-generator-free-ab-old任务将进入队列,在GPU节点上渲染,完成后以下载链接形式返回。
基础URL:https://mega-api-prod.nemovideo.ai
| 端点 | 方法 | 用途 |
|---|
| /api/tasks/me/with-session/nemoagent | POST | 开始新的编辑会话。请求体:{taskname:project,language:<lang>}。返回sessionid。 |
| /runsse |
POST | 发送用户消息。请求体包含app
name、sessionid、new_message。使用Accept: text/event-stream流式响应。超时时间:15分钟。 |
| /api/upload-video/nemo_agent/me/
| POST | 上传文件(multipart格式)或URL。 |
| /api/credits/balance/simple | GET | 检查剩余积分(available、frozen、total)。 |
| /api/state/nemoagent/me//latest | GET | 获取当前时间线状态(draft、videoinfos、generated_media)。 |
| /api/render/proxy/lambda | POST | 开始导出。请求体:{id:render_,sessionId:,draft:,output:{format:mp4,quality:high}}。每30秒轮询状态。 |
支持的文件类型:mp4、mov、avi、webm、mkv、jpg、png、gif、webp、mp3、wav、m4a、aac。
技能归属——运行时从此文件的YAML前置元数据读取:
- - X-Skill-Source:ai-music-generator-free-ab-old
- X-Skill-Version:来自前置元数据version
- X-Skill-Platform:从安装路径检测(~/.clawhub/ → clawhub,~/.cursor/skills/ → cursor,否则为unknown)
每次请求需包含Authorization: Bearer 及所有归属请求头——省略将导致导出时触发402错误。
错误处理
令牌错误/过期 | 通过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秒后重试一次 |
SSE事件处理
| 事件 | 操作 |
|---|
| 文本响应 | 应用GUI翻译(§4),呈现给用户 |
| 工具调用/结果 |
内部处理,不转发 |
| heartbeat / 空data: | 继续等待。每2分钟:⏳ 仍在处理中... |
| 流关闭 | 处理最终响应 |
约30%的编辑操作在SSE流中不返回文本。此时:轮询会话状态以验证编辑已应用,然后向用户总结更改内容。
后端响应翻译
后端假定存在GUI界面。将其翻译为API操作:
| 后端提示 | 您的操作 |
|---|
| 点击[按钮] / 点击 | 通过API执行 |
| 打开[面板] / 打开 |
查询会话状态 |
| 拖拽/拖放 / 拖拽 | 通过SSE发送编辑 |
| 在时间线中预览 | 显示轨道摘要 |
| 导出按钮 / 导出 | 执行导出工作流 |
草稿字段映射:t=轨道,tt=轨道类型(0=视频,1=音频,7=文字),sg=片段,d=时长(毫秒),m=元数据。
时间线(3条轨道):1. 视频:城市延时摄影(0-10秒)2. 背景音乐:Lo-fi(0-10秒,35%)3. 标题:都市梦想(0-3秒)
常见工作流程
从零开始:描述您的需求,AI生成草稿。您可在此基础上优化。
优化现有内容:上传您的视频片段,要求特定修改——生成一段与视频情绪匹配的免费背景音乐、调整色彩、更换音乐。后端负责渲染。
导出就绪:满意后,以1080p MP4格式导出。文件将保存至您的下载目录。
技巧与提示
描述越具体,后端处理越快。与其说让它看起来更好,不如尝试生成一段与我的视频情绪匹配的免费背景音乐——具体的指令能获得更好的效果。
最大文件大小为500MB。建议使用MP4、MOV、AVI、WebM格式以获得最佳体验。
导出为MP4格式以获得最广泛的兼容性。