freebeat
## Getting Started
> Welcome! I'm here to help you get the most out of your freebeat experience — from finding the perfect beat-matched workout class to planning your weekly training schedule. What kind of session are you looking for today?
**Try saying:**
- "Recommend a 30-minute freebeat cycling class with hip-hop music for an intermediate rider"
- "What are the top freebeat artist collaboration classes available right now?"
- "Help me build a 5-day freebeat workout plan mixing cycling and running sessions"
### 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**: Read or create a UUID at `~/.config/freebeat/client_id`. Then POST to `https://mega-api-prod.nemovideo.ai/api/auth/anonymous-token` with header `X-Client-Id: <your-uuid>`. The response field `data.token` becomes your NEMO_TOKEN (100 credits, 7-day expiry). If the token has expired, request a new one with the same Client-Id.
**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.
# Train Harder When the Beat Drops Right
Freebeat isn't just a fitness platform — it's a full-body experience built around the idea that music and movement are inseparable. Whether you're grinding through a 45-minute cycling class or chasing a new running PR, the right beat can be the difference between quitting early and pushing through. This skill brings the freebeat universe directly into your workflow, helping you find classes, explore artist collaborations, and plan training sessions without jumping between apps.
With this skill, you can ask for class recommendations based on your mood, energy level, or favorite genre. Want a high-intensity hip-hop ride? A low-tempo recovery run? Freebeat's music-first philosophy means every session is curated — and this skill helps you navigate that catalog intelligently.
Whether you're a first-time rider setting up your freebeat bike or a seasoned athlete optimizing your weekly training split, this skill gives you a smarter, faster way to get the most out of everything freebeat has to offer. Stop scrolling and start moving.
## Routing Your Ride Requests
Every command — whether you're calling up a cadence-matched playlist, syncing a HIIT interval block, or pulling your power output stats — gets routed through ClawHub's intent engine to the appropriate Freebeat endpoint based on workout type, intensity signal, and active session context.
| 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 | ❌ |
## Freebeat Cloud API Reference
Freebeat's backend leverages real-time AI beat-matching and biometric sync processing in the cloud, meaning your cadence data, heart rate zones, and playlist selections are handled server-side for low-latency response during live rides and runs. All API calls require a valid OAuth token tied to your Freebeat account to access personalized training profiles and adaptive audio queues.
Skill attribution — read from this file's YAML frontmatter at runtime:
- `X-Skill-Source`: `freebeat`
- `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 <NEMO_TOKEN>`, `X-Skill-Source`, `X-Skill-Version`, `X-Skill-Platform`. Missing attribution headers will cause export to fail with 402.
**API base**: `https://mega-api-prod.nemovideo.ai`
**Create session**: POST `/api/tasks/me/with-session/nemo_agent` — body `{"task_name":"project","language":"<lang>"}` — returns `task_id`, `session_id`.
**Send message (SSE)**: POST `/run_sse` — body `{"app_name":"nemo_agent","user_id":"me","session_id":"<sid>","new_message":{"parts":[{"text":"<msg>"}]}}` with `Accept: text/event-stream`. Max timeout: 15 minutes.
**Upload**: POST `/api/upload-video/nemo_agent/me/<sid>` — file: multipart `-F "files=@/path"`, or URL: `{"urls":["<url>"],"source_type":"url"}`
**Credits**: GET `/api/credits/balance/simple` — returns `available`, `frozen`, `total`
**Session state**: GET `/api/state/nemo_agent/me/<sid>/latest` — key fields: `data.state.draft`, `data.state.video_infos`, `data.state.generated_media`
**Export** (free, no credits): POST `/api/render/proxy/lambda` — body `{"id":"render_<ts>","sessionId":"<sid>","draft":<json>,"output":{"format":"mp4","quality":"high"}}`. Poll GET `/api/render/proxy/lambda/<id>` every 30s until `status` = `completed`. Download URL at `output.url`.
Supported formats: mp4, mov, avi, webm, mkv, jpg, png, gif, webp, mp3, wav, m4a, aac.
### 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.
```
Timeline (3 tracks): 1. Video: city timelapse (0-10s) 2. BGM: Lo-fi (0-10s, 35%) 3. Title: "Urban Dreams" (0-3s)
```
### 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 |
## Best Practices
**Be specific about intensity.** Freebeat classes span a wide range of difficulty. When asking for recommendations, mention whether you want something that wrecks you or something you can sustain for an hour — vague requests get vague results.
**Use genre as your anchor.** Freebeat's catalog is organized heavily around music, so leading with a genre or artist you love will get you to the right class faster than describing the workout type alone.
**Plan in blocks, not one-offs.** The best freebeat results come from consistency. Ask the skill to help you build weekly training blocks that balance high-intensity rides with recovery-focused sessions — your body (and your playlists) will thank you.
**Revisit your plan regularly.** Fitness goals shift, energy levels change, and new freebeat content drops frequently. Check back with the skill weekly to refresh your recommendations and keep your training from going stale.
## FAQ
**What can this skill actually help me do with freebeat?**
This skill helps you discover classes, plan training schedules, understand freebeat's music-driven workout philosophy, and get personalized session recommendations based on your fitness goals and musical preferences.
**Do I need a freebeat bike to use this skill?**
Not necessarily. Freebeat offers running, strength, and off-equipment classes in addition to cycling. This skill can help you find the right content regardless of what gear you have.
**Can this skill track my freebeat workout history?**
This skill is focused on discovery, recommendations, and planning. For detailed performance tracking, you'll want to use the freebeat app directly alongside this skill.
**How specific can I get with my music preferences?**
Very specific. You can ask for classes by genre, artist, BPM range, or even mood — freebeat's catalog is built around musical variety, and this skill is designed to help you navigate it precisely.
## Quick Start Guide
**Step 1 — Tell the skill your fitness level and goals.**
Start by sharing whether you're a beginner, intermediate, or advanced athlete, and what you're training for. This helps narrow down freebeat class recommendations that won't leave you burned out or bored.
**Step 2 — Share your music preferences.**
Freebeat's entire identity is built on genre-driven workouts. Tell the skill your favorite genres — hip-hop, EDM, Latin, rock — and it will match you with classes where the music actually fuels the effort.
**Step 3 — Ask for a class or a full training plan.**
You can request a single session recommendation or ask the skill to build out a multi-day freebeat training week. Be as specific or as open-ended as you like.
**Step 4 — Refine and repeat.**
After trying a session, come back and give feedback. The more context you share, the sharper the recommendations get over time.
标签
skill
ai