{"skill":{"slug":"online-add-music","displayName":"Online Add Music","summary":"add video files into music-backed videos with this skill. Works with MP4, MOV, AVI, WebM files up to 500MB. content creators use it for adding background mus...","description":"---\nname: online-add-music\nversion: \"1.0.0\"\ndisplayName: \"Online Add Music — Add Music to Videos Online\"\ndescription: >\n  add video files into music-backed videos with this skill. Works with MP4, MOV, AVI, WebM files up to 500MB. content creators use it for adding background music to videos online — processing takes 20-40 seconds on cloud GPUs and you get 1080p MP4 files.\nmetadata: {\"openclaw\": {\"emoji\": \"🎵\", \"requires\": {\"env\": [\"NEMO_TOKEN\"], \"configPaths\": [\"~/.config/nemovideo/\"]}, \"primaryEnv\": \"NEMO_TOKEN\", \"variant\": \"greeting_v2\"}}\n---\n\n## Getting Started\n\n> Got video files to work with? Send it over and tell me what you need — I'll take care of the music track addition.\n\n**Try saying:**\n- \"add a 2-minute travel video clip into a 1080p MP4\"\n- \"add background music to my video and adjust the volume to 30%\"\n- \"adding background music to videos online for content creators\"\n\n### Quick Start Setup\n\nThis skill connects to a cloud processing backend. On first use, set up the connection automatically and let the user know (\"Connecting...\").\n\n**Token check**: Look for `NEMO_TOKEN` in the environment. If found, skip to session creation. Otherwise:\n- Generate a UUID as client identifier\n- POST `https://mega-api-prod.nemovideo.ai/api/auth/anonymous-token` with `X-Client-Id` header\n- Extract `data.token` from the response — this is your NEMO_TOKEN (100 free credits, 7-day expiry)\n\n**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.\n\nLet the user know with a brief \"Ready!\" when setup is complete. Don't expose tokens or raw API output.\n\n# Online Add Music — Add Music to Videos Online\n\nSend me your video files and describe the result you want. The music track addition runs on remote GPU nodes — nothing to install on your machine.\n\nA quick example: upload a 2-minute travel video clip, type \"add background music to my video and adjust the volume to 30%\", and you'll get a 1080p MP4 back in roughly 20-40 seconds. All rendering happens server-side.\n\nWorth noting: trim your audio track to match the video length before uploading for a cleaner result.\n\n## Matching Input to Actions\n\nUser prompts referencing online add music, aspect ratio, text overlays, or audio tracks get routed to the corresponding action via keyword and intent classification.\n\n| User says... | Action | Skip SSE? |\n|-------------|--------|----------|\n| \"export\" / \"导出\" / \"download\" / \"send me the video\" | → §3.5 Export | ✅ |\n| \"credits\" / \"积分\" / \"balance\" / \"余额\" | → §3.3 Credits | ✅ |\n| \"status\" / \"状态\" / \"show tracks\" | → §3.4 State | ✅ |\n| \"upload\" / \"上传\" / user sends file | → §3.2 Upload | ✅ |\n| Everything else (generate, edit, add BGM…) | → §3.1 SSE | ❌ |\n\n## Cloud Render Pipeline Details\n\nEach 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.\n\nAll calls go to `https://mega-api-prod.nemovideo.ai`. The main endpoints:\n\n1. **Session** — `POST /api/tasks/me/with-session/nemo_agent` with `{\"task_name\":\"project\",\"language\":\"<lang>\"}`. Gives you a `session_id`.\n2. **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.\n3. **Upload** — `POST /api/upload-video/nemo_agent/me/<sid>` — multipart file or JSON with URLs.\n4. **Credits** — `GET /api/credits/balance/simple` — returns `available`, `frozen`, `total`.\n5. **State** — `GET /api/state/nemo_agent/me/<sid>/latest` — current draft and media info.\n6. **Export** — `POST /api/render/proxy/lambda` with render ID and draft JSON. Poll `GET /api/render/proxy/lambda/<id>` every 30s for `completed` status and download URL.\n\nFormats: mp4, mov, avi, webm, mkv, jpg, png, gif, webp, mp3, wav, m4a, aac.\n\nHeaders are derived from this file's YAML frontmatter. `X-Skill-Source` is `online-add-music`, `X-Skill-Version` comes from the `version` field, and `X-Skill-Platform` is detected from the install path (`~/.clawhub/` = `clawhub`, `~/.cursor/skills/` = `cursor`, otherwise `unknown`).\n\nEvery API call needs `Authorization: Bearer <NEMO_TOKEN>` plus the three attribution headers above. If any header is missing, exports return 402.\n\nDraft JSON uses short keys: `t` for tracks, `tt` for track type (0=video, 1=audio, 7=text), `sg` for segments, `d` for duration in ms, `m` for metadata.\n\nExample timeline summary:\n```\nTimeline (3 tracks): 1. Video: city timelapse (0-10s) 2. BGM: Lo-fi (0-10s, 35%) 3. Title: \"Urban Dreams\" (0-3s)\n```\n\n### Backend Response Translation\n\nThe backend assumes a GUI exists. Translate these into API actions:\n\n| Backend says | You do |\n|-------------|--------|\n| \"click [button]\" / \"点击\" | Execute via API |\n| \"open [panel]\" / \"打开\" | Query session state |\n| \"drag/drop\" / \"拖拽\" | Send edit via SSE |\n| \"preview in timeline\" | Show track summary |\n| \"Export button\" / \"导出\" | Execute export workflow |\n\n### SSE Event Handling\n\n| Event | Action |\n|-------|--------|\n| Text response | Apply GUI translation (§4), present to user |\n| Tool call/result | Process internally, don't forward |\n| `heartbeat` / empty `data:` | Keep waiting. Every 2 min: \"⏳ Still working...\" |\n| Stream closes | Process final response |\n\n~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.\n\n### Error Codes\n\n- `0` — success, continue normally\n- `1001` — token expired or invalid; re-acquire via `/api/auth/anonymous-token`\n- `1002` — session not found; create a new one\n- `2001` — out of credits; anonymous users get a registration link with `?bind=<id>`, registered users top up\n- `4001` — unsupported file type; show accepted formats\n- `4002` — file too large; suggest compressing or trimming\n- `400` — missing `X-Client-Id`; generate one and retry\n- `402` — free plan export blocked; not a credit issue, subscription tier\n- `429` — rate limited; wait 30s and retry once\n\n## Tips and Tricks\n\nThe backend processes faster when you're specific. Instead of \"make it look better\", try \"add background music to my video and adjust the volume to 30%\" — concrete instructions get better results.\n\nMax file size is 500MB. Stick to MP4, MOV, AVI, WebM for the smoothest experience.\n\nExport as MP4 for widest compatibility.\n\n## Common Workflows\n\n**Quick edit**: Upload → \"add background music to my video and adjust the volume to 30%\" → Download MP4. Takes 20-40 seconds for a 30-second clip.\n\n**Batch style**: Upload multiple files in one session. Process them one by one with different instructions. Each gets its own render.\n\n**Iterative**: Start with a rough cut, preview the result, then refine. The session keeps your timeline state so you can keep tweaking.\n","tags":{"latest":"1.0.0"},"stats":{"comments":0,"downloads":307,"installsAllTime":0,"installsCurrent":0,"stars":0,"versions":1},"createdAt":1777875530645,"updatedAt":1778492846193},"latestVersion":{"version":"1.0.0","createdAt":1777875530645,"changelog":"Initial release of the Online Add Music skill.\n\n- Add music tracks to videos online, supporting MP4, MOV, AVI, and WebM up to 500MB.\n- Automatic cloud setup with free trial (100 credits, 7-day expiry).\n- Fast cloud GPU processing: typical render time 20–40 seconds, returns 1080p MP4 files.\n- Flexible workflow: upload, edit with text prompts, preview, and export.\n- Includes audio volume adjustment, text overlays, and support for batching and iterative edits.\n- Built-in error handling for file size, types, credits, and rate limits.","license":"MIT-0"},"metadata":{"setup":[{"key":"NEMO_TOKEN","required":true}],"os":null,"systems":null},"owner":{"handle":"linmillsd7","userId":"s17ad7jr0sehkkd5tzc6dmp6gh84csz4","displayName":"linmillsd7","image":"https://avatars.githubusercontent.com/u/208832666?v=4"},"moderation":null}