Getting Started
Welcome! I'm your Video Compressor AI — ready to help you reduce file sizes, optimize formats, and prep your videos for any platform or storage need. Tell me about your video and what you're trying to achieve, and let's compress it the smart way.
Try saying:
- - "Compress this 2GB wedding video to under 500MB for sharing via email without making it look blurry"
- "Convert my MP4 file to H.265 format and reduce the file size by at least 60% while keeping 1080p resolution"
- "I have 200 training videos taking up 300GB — what compression settings should I use to cut storage in half without losing readability of on-screen text?"
Getting Connected
Before handling any user request, establish a connection to the backend API. Show a brief status like "Connecting...".
If NEMO_TOKEN is in the environment, use it directly and create a session. Otherwise, acquire a free starter token:
- - Generate a UUID as client identifier
- POST to
https://mega-api-prod.nemovideo.ai/api/auth/anonymous-token with the X-Client-Id header - The response includes a
token with 100 free credits valid for 7 days — use it as NEMO_TOKEN
Then create a session by POSTing to https://mega-api-prod.nemovideo.ai/api/tasks/me/with-session/nemo_agent with Bearer authorization and body {"task_name":"project","language":"en"}. The session_id in the response is needed for all following requests.
Tell the user you're ready. Keep the technical details out of the chat.
Compress Smarter: AI That Reads Your Footage
Most video compression tools treat every file the same — they apply a blanket setting and hope for the best. Video Compressor AI takes a different approach. By understanding the content of your video — motion complexity, scene transitions, color depth, and audio layers — it recommends and applies compression strategies tailored to what's actually in your footage.
Whether you're trimming a 4K drone reel down for Instagram, reducing a product demo for faster web loading, or archiving a library of training videos without blowing your storage budget, this skill adapts to your goal. You describe what you need in plain language — target file size, platform destination, acceptable quality trade-offs — and the AI handles the technical decisions behind the scenes.
No more guessing between H.264 and H.265, no more trial-and-error with CRF values, and no more re-exporting the same clip five times. Video Compressor AI brings precision compression into a workflow that actually fits how creators and teams operate day-to-day.
Compression Request Routing Logic
When you submit a video, your request is parsed for codec preference, target bitrate, resolution constraints, and container format before being dispatched to the optimal processing node.
| 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 Encoding Backend Reference
Video Compressor AI routes encoded workloads through a distributed transcoding cluster that applies perceptual quality metrics — including VMAF and SSIM scoring — to preserve visual fidelity while aggressively reducing file size. Each job runs in an isolated encoding pipeline supporting H.264, H.265/HEVC, AV1, and VP9 output targets.
Skill attribution — read from this file's YAML frontmatter at runtime:
- -
X-Skill-Source: INLINECODE8 - INLINECODE9 : from frontmatter INLINECODE10
- INLINECODE11 : 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: INLINECODE21
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: INLINECODE31
Credits: GET /api/credits/balance/simple — returns available, frozen, INLINECODE35
Session state: GET /api/state/nemo_agent/me/<sid>/latest — key fields: data.state.draft, data.state.video_infos, INLINECODE39
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.
CODEBLOCK0
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
Always start with your original, uncompressed source file. Compressing an already-compressed video compounds quality loss in ways that even the best AI settings cannot fully recover from. If you've lost the original, mention this upfront so the AI can adjust its approach to minimize generational degradation.
Be specific about your destination. A video compressed for a 4K TV screen needs a very different profile than one destined for a mobile app thumbnail preview. The more context you give — device type, viewing environment, bandwidth constraints — the more accurate the compression recommendation will be.
For long-form content like webinars or documentaries, consider asking the AI about scene-based compression, where static talking-head segments get higher compression rates than fast-action sequences. This hybrid approach can yield 30–50% better file size reduction compared to flat compression across the whole file.
Finally, always request a quality checkpoint before finalizing batch jobs. Ask the AI to flag which settings carry the highest risk of visible degradation so you can review those files manually before delivery.
Quick Start Guide
Getting started with Video Compressor AI is straightforward — no encoding knowledge required. Begin by describing your video: its current format, resolution, duration, and file size if known. Then tell the AI your end goal — whether that's hitting a specific file size, meeting a platform's upload limit (like YouTube, TikTok, or LinkedIn), or simply reducing storage footprint.
The AI will ask clarifying questions if needed — for example, whether audio quality matters as much as video, or whether you need the output in a specific container format like MP4, MOV, or WebM. Once it has enough context, it will generate a recommended compression profile with clear reasoning behind each setting.
For batch compression needs, describe your folder structure or file naming convention and the AI will suggest a consistent compression strategy you can apply across all files. You can also request a comparison — asking the AI to outline what you'd gain and lose at different compression levels before committing to a final export setting.
Use Cases
Video Compressor AI serves a wide range of real-world scenarios across industries and workflows. Social media managers use it to hit platform-specific file size caps — TikTok's 287MB limit or Instagram's 650MB ceiling — without re-shooting or over-cropping content. The AI knows the sweet spots for each platform and compresses accordingly.
E-learning developers rely on it to shrink course video libraries before uploading to LMS platforms like Teachable or Moodle, where storage costs scale with file size. By compressing lecture recordings intelligently, text and slides remain crisp while overall file size drops dramatically.
Filmmakers and video editors use it during client delivery — sending proxy-quality previews for approval before handing over full-resolution masters. And for businesses running video-heavy websites, the AI helps optimize autoplay background videos and product demos to reduce page load times without introducing compression artifacts that would undermine brand perception.
快速上手
欢迎!我是你的视频压缩AI助手——随时准备帮你减小文件体积、优化格式,并为任何平台或存储需求准备好你的视频。告诉我你的视频情况和目标,让我们用智能的方式进行压缩。
试试这样说:
- - 把这个2GB的婚礼视频压缩到500MB以下,用于邮件分享,同时保持画面清晰
- 将我的MP4文件转换为H.265格式,在保持1080p分辨率的同时将文件体积减少至少60%
- 我有200个培训视频,占用了300GB空间——应该使用什么压缩设置才能在保持屏幕文字可读性的同时将存储空间减半?
建立连接
在处理任何用户请求之前,先建立与后端API的连接。显示简短的状态信息,如正在连接...。
如果环境中存在NEMO_TOKEN,直接使用它并创建会话。否则,获取一个免费的起始令牌:
- - 生成一个UUID作为客户端标识符
- 使用X-Client-Id头向https://mega-api-prod.nemovideo.ai/api/auth/anonymous-token发送POST请求
- 响应中包含一个token,附带100个免费积分,有效期为7天——将其用作NEMO_TOKEN
然后创建会话,向https://mega-api-prod.nemovideo.ai/api/tasks/me/with-session/nemoagent发送POST请求,使用Bearer授权和请求体{taskname:project,language:en}。响应中的session_id将用于所有后续请求。
告诉用户你已准备就绪。不要在聊天中透露技术细节。
更智能的压缩:能读懂你视频内容的AI
大多数视频压缩工具对所有文件一视同仁——它们采用一刀切的设置,然后寄希望于最好的结果。视频压缩AI采取了不同的方法。通过理解视频的内容——运动复杂度、场景转换、色彩深度和音频层——它能够推荐并应用针对视频实际内容的压缩策略。
无论你是要裁剪4K无人机素材用于Instagram,减小产品演示视频以加快网页加载速度,还是归档培训视频库而不超出存储预算,这个技能都能适应你的目标。你用通俗语言描述你的需求——目标文件大小、目标平台、可接受的质量折衷——AI则在幕后处理技术决策。
不再需要在H.264和H.265之间猜测,不再需要反复试验CRF值,也不再需要将同一个片段导出五次。视频压缩AI将精确压缩带入真正适合创作者和团队日常操作的工作流程中。
压缩请求路由逻辑
当你提交视频时,你的请求会被解析以确定编解码器偏好、目标比特率、分辨率限制和容器格式,然后被分发到最优的处理节点。
| 用户说... | 操作 | 跳过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通过分布式转码集群路由编码工作负载,该集群应用感知质量指标——包括VMAF和SSIM评分——在积极减小文件体积的同时保持视觉保真度。每个作业在独立的编码管道中运行,支持H.264、H.265/HEVC、AV1和VP9输出目标。
技能归属——运行时从此文件的YAML前置元数据中读取:
- - X-Skill-Source:video-compressor-ai
- X-Skill-Version:来自前置元数据version
- X-Skill-Platform:从安装路径检测(~/.clawhub/ → clawhub,~/.cursor/skills/ → cursor,否则 unknown)
所有请求必须包含:Authorization: Bearer 、X-Skill-Source、X-Skill-Version、X-Skill-Platform。缺少归属头会导致导出失败,返回402错误。
API基础地址:https://mega-api-prod.nemovideo.ai
创建会话:POST /api/tasks/me/with-session/nemoagent — 请求体 {taskname:project,language:} — 返回 taskid、sessionid。
发送消息(SSE):POST /runsse — 请求体 {appname:nemoagent,userid:me,sessionid:,newmessage:{parts:[{text:}]}} 并设置 Accept: text/event-stream。最大超时时间:15分钟。
上传:POST /api/upload-video/nemoagent/me/ — 文件:multipart -F files=@/path,或URL:{urls:[],sourcetype:url}
积分:GET /api/credits/balance/simple — 返回 available、frozen、total
会话状态:GET /api/state/nemoagent/me//latest — 关键字段:data.state.draft、data.state.videoinfos、data.state.generated_media
导出(免费,不消耗积分):POST /api/render/proxy/lambda — 请求体 {id:render_,sessionId:,draft:,output:{format:mp4,quality:high}}。每30秒轮询GET /api/render/proxy/lambda/,直到status = completed。下载URL位于output.url。
支持的格式:mp4、mov、avi、webm、mkv、jpg、png、gif、webp、mp3、wav、m4a、aac。
SSE事件处理
| 事件 | 操作 |
|---|
| 文本响应 | 应用GUI翻译(§4),呈现给用户 |
| 工具调用/结果 |
内部处理,不转发 |
| heartbeat / 空 data: | 继续等待。每2分钟:⏳ 仍在处理中... |
| 流关闭 | 处理最终响应 |
约30%的编辑操作在SSE流中不返回文本。发生这种情况时:轮询会话状态以验证编辑是否已应用,然后向用户总结更改。
后端响应翻译
后端假定存在GUI。将这些翻译为API操作:
| 后端说 | 你执行 |
|---|
| click [button] / 点击 | 通过API执行 |
| open [panel] / 打开 |
查询会话状态 |
| drag/drop / 拖拽 | 通过SSE发送编辑 |
| preview in timeline | 显示轨道摘要 |
| Export button / 导出 | 执行导出工作流 |
草稿字段映射:t=轨道,tt=轨道类型(0=视频,1=音频,7=文字),sg=片段,d=时长(毫秒),m=元数据。
时间线(3条轨道):1. 视频:城市延时摄影(0-10秒)2. 背景音乐:Lo-fi(0-10秒,35%)3. 标题:都市梦想(0-3秒)
错误处理
令牌错误/过期 | 通过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秒后重试一次 |
最佳实践
始终从原始、未压缩的源文件开始。压缩已经压缩过的视频会加剧质量损失,即使是最优秀的AI设置也无法完全恢复。如果你丢失了原始文件,请