2025-08-01 16:26:41 +08:00
# 🎬 CapCutAPI - Enterprise Video Editing Automation Platform
2025-07-11 18:02:44 +08:00
2025-08-01 16:26:41 +08:00
<div align="center">
2025-07-11 18:02:44 +08:00
2025-08-01 16:26:41 +08:00

2025-07-30 18:51:17 +08:00
2025-08-01 16:26:41 +08:00
[](https://github.com/sun-guannan/CapCutAPI/stargazers)
[](LICENSE)
[](https://python.org)
[](./MCP_Documentation_English.md)
2025-07-12 09:49:46 +08:00
2025-08-01 16:26:41 +08:00
**🚀 Open source CapCut API tool with MCP (Model Context Protocol) support**
2025-07-31 09:19:57 +08:00
2025-08-01 16:26:41 +08:00
[🌐 Try Online ](https://www.capcutapi.top ) • [📖 中文文档 ](README-zh.md ) • [🔧 MCP Docs ](./MCP_Documentation_English.md ) • [🌍 MCP 中文指南 ](./MCP_文档_中文.md )
2025-07-31 09:19:57 +08:00
2025-08-01 16:26:41 +08:00
</div>
2025-07-31 09:19:57 +08:00
2025-08-01 16:26:41 +08:00
---
2025-07-31 09:19:57 +08:00
2025-08-01 16:26:41 +08:00
## 🎯 Project Overview
2025-07-11 18:02:44 +08:00
2025-08-01 16:26:41 +08:00
**CapCutAPI** is a powerful enterprise-grade video editing automation platform built with Python, providing complete CapCut video editing capabilities. Through dual interfaces of HTTP API and MCP protocol, it enables seamless integration with AI assistants and automation tools.
2025-07-11 18:02:44 +08:00
2025-08-01 16:26:41 +08:00
### 🏆 Core Advantages
2025-07-11 18:02:44 +08:00
2025-08-01 16:26:41 +08:00
<table>
<tr>
<td width="50%">
2025-07-11 18:02:44 +08:00
2025-08-01 16:26:41 +08:00
**🎬 Professional Video Editing**
- Complete CapCut functionality support
- Multi-track timeline editing
- Advanced effects and transitions
- Keyframe animation system
2025-07-11 18:02:44 +08:00
2025-08-01 16:26:41 +08:00
</td>
<td width="50%">
2025-07-11 18:02:44 +08:00
2025-08-01 16:26:41 +08:00
**🤖 AI Smart Integration**
- Native MCP protocol support
- Seamless AI assistant integration
- Automated workflow processes
- Batch processing capabilities
2025-07-11 18:02:44 +08:00
2025-08-01 16:26:41 +08:00
</td>
</tr>
<tr>
<td>
2025-07-11 18:02:44 +08:00
2025-08-01 16:26:41 +08:00
**🔌 Dual API Interfaces**
- RESTful HTTP API
- Model Context Protocol
- Real-time processing response
- Enterprise-grade stability
2025-07-11 18:02:44 +08:00
2025-08-01 16:26:41 +08:00
</td>
<td>
2025-08-01 16:13:21 +08:00
2025-08-01 16:26:41 +08:00
**🌍 Cross-platform Compatibility**
- CapCut International support
- JianYing China support
- Windows/macOS compatible
- Cloud deployment ready
2025-08-01 16:13:21 +08:00
2025-08-01 16:26:41 +08:00
</td>
</tr>
</table>
2025-08-01 16:13:21 +08:00
2025-08-01 16:26:41 +08:00
---
2025-07-11 18:02:44 +08:00
2025-08-01 16:26:41 +08:00
## 🎥 Product Showcase
2025-08-01 16:13:21 +08:00
2025-08-01 16:26:41 +08:00
<div align="center">
2025-08-01 16:13:21 +08:00
2025-08-01 16:26:41 +08:00
### 🐎 AI Generated Video Cases
2025-07-11 18:02:44 +08:00
2025-08-01 16:26:41 +08:00
[](https://www.youtube.com/watch?v=IF1RDFGOtEU)
2025-07-11 18:02:44 +08:00
2025-08-01 16:26:41 +08:00
### 🎵 Music Video Production
2025-07-12 09:52:23 +08:00
2025-08-01 16:26:41 +08:00
[](https://www.youtube.com/watch?v=rGNLE_slAJ8)
2025-07-12 09:52:23 +08:00
2025-08-01 16:26:41 +08:00
*AI-driven video generation powered by CapCutAPI*
2025-07-11 18:02:44 +08:00
2025-08-01 16:26:41 +08:00
</div>
2025-08-01 16:13:21 +08:00
2025-08-01 16:26:41 +08:00
---
2025-07-12 09:52:23 +08:00
2025-08-01 16:26:41 +08:00
## 🚀 Core Features
2025-08-01 16:13:21 +08:00
2025-08-01 16:26:41 +08:00
### 📋 Feature Matrix
2025-08-01 16:13:21 +08:00
2025-08-01 16:26:41 +08:00
| Feature Module | HTTP API | MCP Protocol | Description |
|---------------|----------|--------------|-------------|
| 🎬 **Draft Management ** | ✅ | ✅ | Create, read, modify, save CapCut draft files |
| 🎥 **Video Processing ** | ✅ | ✅ | Multi-format video import, editing, transitions, effects |
| 🔊 **Audio Editing ** | ✅ | ✅ | Audio tracks, volume control, audio effects |
| 🖼️ **Image Processing ** | ✅ | ✅ | Image import, animations, masks, filters |
| 📝 **Text Editing ** | ✅ | ✅ | Multi-style text, shadows, backgrounds, animations |
| 📄 **Subtitle System ** | ✅ | ✅ | SRT subtitle import, styling, time sync |
| ✨ **Effects Engine ** | ✅ | ✅ | Visual effects, filters, transition animations |
| 🎭 **Sticker System ** | ✅ | ✅ | Sticker assets, position control, animation effects |
| 🎯 **Keyframes ** | ✅ | ✅ | Property animations, timeline control, easing functions |
| 📊 **Media Analysis ** | ✅ | ✅ | Video duration detection, format analysis |
2025-08-01 16:13:21 +08:00
2025-08-01 16:26:41 +08:00
### 🛠️ API Interface Overview
2025-08-01 16:13:21 +08:00
2025-08-01 16:26:41 +08:00
<details>
<summary><b>📡 HTTP API Endpoints (9 endpoints)</b></summary>
Trae
参考了 2 个上下文
README-zh.md
README.md
📝 README 文档更新完成
我已经为您准备了优化后的 README 文档内容,包括英文版和中文版。以下是完整的文档内容:
2025-08-01 16:13:21 +08:00
2025-08-01 16:26:41 +08:00
📄 英文文档 (README.md)
README.md
2025-08-01 16:13:21 +08:00
2025-08-01 16:05:15 +08:00
2025-08-01 16:13:21 +08:00
2025-08-01 16:26:41 +08:00
应用
# 🎬 CapCutAPI - Enterprise Video Editing Automation Platform<div align="center">[](https://github.com/sun-guannan/CapCutAPI/stargazers)[](LICENSE)[](https://python.org)[](./MCP_Documentation_English.md)**🚀 Open source CapCut API tool with MCP (Model Context Protocol) support**[🌐 Try Online](https://www.capcutapi.top) • [📖 中文文档](README-zh.md) • [🔧 MCP Docs](./MCP_Documentation_English.md) • [🌍 MCP 中文指南](./MCP_文档_中文.md)</div>---## 🎯 Project Overview**CapCutAPI** is a powerful enterprise-grade video editing automation platform built with Python, providing complete CapCut video editing capabilities. Through dual interfaces of HTTP API and MCP protocol, it enables seamless integration with AI assistants and automation tools.### 🏆 Core Advantages<table><tr><td width="50%">**🎬 Professional Video Editing**- Complete CapCut functionality support- Multi-track timeline editing- Advanced effects and transitions- Keyframe animation system</td><td width="50%">**🤖 AI Smart Integration**- Native MCP protocol support- Seamless AI assistant integration- Automated workflow processes- Batch processing capabilities</td></tr><tr><td>**🔌 Dual API Interfaces**- RESTful HTTP API- Model Context Protocol- Real-time processing response- Enterprise-grade stability</td><td>**🌍 Cross-platform Compatibility**- CapCut International support- JianYing China support- Windows/macOS compatible- Cloud deployment ready</td></tr></table>---## 🎥 Product Showcase<div align="center">### 🐎 AI Generated Video Cases[](https://www.youtube.com/watch?v=IF1RDFGOtEU)### 🎵 Music Video Production[](https://www.youtube.com/watch?v=rGNLE_slAJ8)*AI-driven video generation powered by CapCutAPI*</div>---## 🚀 Core Features### 📋 Feature Matrix| Feature Module | HTTP API | MCP Protocol | Description ||---------------|----------|--------------|-------------|| 🎬 **Draft Management** | ✅ | ✅ | Create, read, modify, save CapCut draft files || 🎥 **Video Processing** | ✅ | ✅ | Multi-format video import, editing, transitions, effects || 🔊 **Audio Editing** | ✅ | ✅ | Audio tracks, volume control, audio effects || 🖼️ **Image Processing** | ✅ | ✅ | Image import, animations, masks, filters || 📝 **Text Editing** | ✅ | ✅ | Multi-style text, shadows, backgrounds, animations || 📄 **Subtitle System** | ✅ | ✅ | SRT subtitle import, styling, time sync || ✨ **Effects Engine** | ✅ | ✅ | Visual effects, filters, transition animations || 🎭 **Sticker System** | ✅ | ✅ | Sticker assets, position control, animation effects || 🎯 **Keyframes** | ✅ | ✅ | Property animations, timeline control, easing functions || 📊 **Media Analysis** | ✅ | ✅ | Video duration detection, format analysis |### 🛠️ API Interface Overview<details><summary><b>📡 HTTP API Endpoints (9 endpoints)</b></summary>
🎬 Draft Management ├── POST /create_draft # Create new draft └── POST /save_draft # Save draft file
2025-08-01 16:13:21 +08:00
2025-08-01 16:26:41 +08:00
🎥 Media Assets ├── POST /add_video # Add video material ├── POST /add_audio # Add audio material └── POST /add_image # Add image material
📝 Text Content ├── POST /add_text # Add text elements └── POST /add_subtitle # Add subtitle files
✨ Effect Enhancement ├── POST /add_effect # Add visual effects └── POST /add_sticker # Add sticker elements
</details><details><summary><b>🔧 MCP Tool Set (11 tools)</b></summary>
🎬 Project Management ├── create_draft # Create video project └── save_draft # Save project file
🎥 Media Editing ├── add_video # Video track + transition effects ├── add_audio # Audio track + volume control └── add_image # Image assets + animation effects
📝 Text System ├── add_text # Multi-style text + shadow background └── add_subtitle # SRT subtitles + styling
✨ Advanced Features ├── add_effect # Visual effects engine ├── add_sticker # Sticker animation system ├── add_video_keyframe # Keyframe animations └── get_video_duration # Media information retrieval
</details>---## 🛠️ Quick Start### 📋 System Requirements<table><tr><td width="30%"><b>🐍 Python Environment</b></td><td>Python 3.8.20+ (Recommended 3.10+)</td></tr><tr><td><b>🎬 CapCut Application</b></td><td>CapCut International or JianYing China</td></tr><tr><td><b>🎵 FFmpeg</b></td><td>For media file processing and analysis</td></tr><tr><td><b>💾 Storage Space</b></td><td>At least 2GB available space</td></tr></table>### ⚡ One-Click Installation```bash# 1. Clone the projectgit clone https://github.com/sun-guannan/CapCutAPI.gitcd CapCutAPI# 2. Create virtual environment (recommended)python -m venv venv-capcutsource venv-capcut/bin/activate # Linux/macOS# or venv-capcut\Scripts\activate # Windows# 3. Install dependenciespip install -r requirements.txt # HTTP API basic dependenciespip install -r requirements-mcp.txt # MCP protocol support (optional)# 4. Configurationcp config.json.example config.json# Edit config.json as needed` ``### 🚀 Start Services<table><tr><td width="50%">**🌐 HTTP API Server**` ``bashpython capcut_server.py` ``*Default port: 9001*</td><td width="50%">**🔧 MCP Protocol Server**` ``bashpython mcp_server.py` ``*Supports stdio communication*</td></tr></table>---## 🔧 MCP Integration Guide### 📱 Client ConfigurationCreate or update ` mcp_config.json` configuration file:` ``json{ "mcpServers": { "capcut-api": { "command": "python3", "args": ["mcp_server.py"], "cwd": "/path/to/CapCutAPI", "env": { "PYTHONPATH": "/path/to/CapCutAPI", "DEBUG": "0" } } }}` ``### 🧪 Connection Testing` ``bash# Test MCP connectionpython test_mcp_client.py# Expected output✅ MCP server started successfully✅ Retrieved 11 available tools✅ Draft creation test passed` ``### 🎯 MCP Featured Functions<div align="center">| Feature | Description | Example ||---------|-------------|----------|| 🎨 **Advanced Text Styling** | Multi-color, shadow, background effects | ` shadow_enabled: true` || 🎬 **Keyframe Animation** | Position, scale, opacity animations | ` property_types: ["scale_x", "alpha"]` || 🔊 **Audio Precision Control** | Volume, speed, audio effects | ` volume: 0.8, speed: 1.2` || 📱 **Multi-format Support** | Various video dimensions and formats | ` width: 1080, height: 1920` || ⚡ **Real-time Processing** | Instant draft updates and previews | Millisecond response time |</div>---## 💡 Usage Examples### 🌐 HTTP API Examples<details><summary><b>📹 Adding Video Material</b></summary>` ``pythonimport requests# Add background videoresponse = requests.post("http://localhost:9001/add_video", json={ "video_url": "https://example.com/background.mp4", "start": 0, "end": 10, "width": 1080, "height": 1920, "volume": 0.8, "transition": "fade_in"})print(f"Video addition result: {response.json()}")` ``</details><details><summary><b>📝 Creating Styled Text</b></summary>` ``pythonimport requests# Add title textresponse = requests.post("http://localhost:9001/add_text", json={ "text": "🎬 Welcome to CapCutAPI", "start": 0, "end": 5, "font": "Arial", "font_color": "#FFD700", "font_size": 48, "shadow_enabled": True, "background_color": "#000000"})print(f"Text addition result: {response.json()}")` ``</details>### 🔧 MCP Protocol Examples<details><summary><b>🎯 Complete Workflow</b></summary>` ``python# 1. Create new projectdraft = mcp_client.call_tool("create_draft", { "width": 1080, "height": 1920})draft_id = draft["result"]["draft_id"]# 2. Add background videomcp_client.call_tool("add_video", { "video_url": "https://example.com/bg.mp4", "draft_id": draft_id, "start": 0, "end": 10, "volume": 0.6})# 3. Add title textmcp_client.call_tool("add_text", { "text": "AI-Driven Video Production", "draft_id": draft_id, "start": 1, "end": 6, "font_size": 56, "shadow_enabled": True, "background_color": "#1E1E1E "})# 4. Add keyframe animationmcp_client.call_tool("add_video_keyframe", { "draft_id": draft_id, "track_name": "main", "property_types": ["scale_x", "scale_y",
MIT License
Copyright (c) 2024 CapCutAPI Contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files...
</div>---<div align="center">## 🎉 Get Started Now**Experience the power of CapCutAPI today!**[](https://www.capcutapi.top)[](https://github.com/sun-guannan/CapCutAPI/archive/refs/heads/main.zip)[](./MCP_Documentation_English.md)---**🆕 New Feature**: Now with MCP protocol support for seamless AI assistant integration! Try the MCP server for advanced video editing automation.*Made with ❤️ by the CapCutAPI Community*
2025-08-01 16:13:21 +08:00
2025-08-01 16:26:41 +08:00
</div>