2026-03-01 09:47:20 +08:00
2026-02-23 17:39:52 +08:00
2025-12-15 13:18:49 +08:00
2026-03-01 09:47:20 +08:00
2026-02-28 20:42:38 +08:00
2026-02-28 21:29:42 +08:00
2025-12-15 12:21:38 +08:00
2025-10-27 23:07:46 +08:00
2026-01-31 19:55:07 +08:00
2025-11-23 21:01:33 +08:00
2026-01-31 16:48:46 +08:00
2025-12-08 11:32:20 +08:00
2026-01-20 16:53:32 +08:00
2026-01-17 09:58:26 +08:00
2026-03-01 09:47:20 +08:00
2026-03-01 09:47:20 +08:00

CapCut Mate API

Project Introduction

CapCut Mate API is a Jianying draft automation assistant built on FastAPI, providing rich API interfaces to create and edit Jianying drafts. It supports creating drafts, adding materials such as videos/audio/images/subtitles/effects, saving drafts, and cloud rendering. It can be deployed as a Coze plugin with one-click setup.

Project Resources

If you find this project helpful, please give us a Star! Your support is the greatest motivation for me to continuously maintain and improve the project 😊

Features

  • 🎬 Draft Management: Create draft, get draft, save draft
  • 🎥 Material Addition: Add videos, audios, images, stickers, subtitles, effects, masks, etc.
  • 🔧 Advanced Functions: Keyframe control, text styles, animation effects, etc.
  • 📤 Video Export: Cloud rendering to generate final video
  • 🛡️ Data Validation: Using Pydantic for request data validation
  • 📖 RESTful API: Compliant with standard API design specifications
  • 📚 Auto Documentation: FastAPI automatically generates interactive API documentation

Tech Stack

  • Python 3.11+
  • FastAPI: High-performance web framework
  • Pydantic: Data validation and model definition
  • Passlib: Password encryption (if using user authentication)
  • Uvicorn: ASGI server
  • uv: Python package manager and project management tool

Quick Start

Prerequisites

  • Python 3.11+
  • uv: Python package manager and project management tool

Installation:

Windows

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

Linux/macOS

sh -c "$(curl -LsSf https://astral.sh/uv/install.sh)"

Installation Steps

  1. Clone the project
git clone git@github.com:Hommy-master/capcut-mate.git
cd capcut-mate
  1. Install dependencies
# Install dependencies
uv sync

# Additional execution for Windows
uv pip install -e .[windows]
  1. Start the server
uv run main.py
  1. Access API documentation After starting, visit http://localhost:30000/docs to view the automatically generated interactive API documentation

Container Deployment

docker pull gogoshine/capcut-mate:latest
docker run -p 30000:30000 gogoshine/capcut-mate:latest

Or use docker-compose:

docker-compose up -d

One-Click Import Coze Plugin

  1. Open Coze platform: https://coze.cn/home

    Step 1

  2. Add Plugin

    Step 2

  3. Import Plugin

    Step 3

  4. Upload the openapi.yaml file in the current project directory

    Step 4

  5. Complete file upload

    Step 5

  6. Complete logo replacement

    Step 6

  7. Enable Plugin

    Step 7

API Documentation

The following are the core interfaces provided by CapCut Mate API, supporting a complete video creation workflow:

🏗️ Draft Management

Interface Function Description Documentation Link
create_draft Create Draft Create a new Jianying draft project, set canvas size 📖 View Documentation
save_draft Save Draft Save current draft state, ensure edit content persistence 📖 View Documentation
get_draft Get Draft Get draft file list and detailed information 📖 View Documentation

🎥 Video Materials

Interface Function Description Documentation Link
add_videos Add Videos Batch add video materials, support cropping, scaling, effects 📖 View Documentation
add_images Add Images Batch add image materials, support animations and transition effects 📖 View Documentation
add_sticker Add Stickers Add decorative stickers, support position and size adjustment 📖 View Documentation

🎵 Audio Processing

Interface Function Description Documentation Link
add_audios Add Audios Batch add audio materials, support volume and fade in/out 📖 View Documentation
get_audio_duration Get Audio Duration Get precise duration information of audio files 📖 View Documentation

📝 Text Subtitles

Interface Function Description Documentation Link
add_captions Add Captions Batch add captions, support keyword highlighting and style settings 📖 View Documentation
add_text_style Text Style Create rich text styles, support keyword colors and fonts 📖 View Documentation

Effects & Animations

Interface Function Description Documentation Link
add_effects Add Effects Add visual effects, such as filters, borders, dynamic effects 📖 View Documentation
add_keyframes Keyframe Animation Create property animations for position, scale, rotation, etc. 📖 View Documentation
add_masks Mask Effects Add various shape masks, control visible areas of the screen 📖 View Documentation

🎨 Animation Resources

Interface Function Description Documentation Link
get_text_animations Text Animations Get available text entrance, exit, and loop animations 📖 View Documentation
get_image_animations Image Animations Get available image animation effects list 📖 View Documentation

🎬 Video Generation

Interface Function Description Documentation Link
gen_video Generate Video Submit video rendering task, asynchronous processing 📖 View Documentation
gen_video_status Query Status Query the progress and status of video generation tasks 📖 View Documentation

🚀 Quick Tools

Interface Function Description Documentation Link
easy_create_material Quick Creation Add multiple types of materials at once, simplify creation process 📖 View Documentation

API Usage Examples

Create Draft

curl -X POST "http://localhost:30000/openapi/capcut-mate/v1/create_draft" \
-H "Content-Type: application/json" \
-d '{"width": 1080, "height": 1920}'

Add Videos

curl -X POST "http://localhost:30000/openapi/capcut-mate/v1/add_videos" \
-H "Content-Type: application/json" \
-d '{
  "draft_url": "http://localhost:30000/openapi/capcut-mate/v1/get_draft?draft_id=20251126212753cab03392",
  "video_infos": [
    {
      "url": "https://example.com/video.mp4",
      "start": 0,
      "end": 1000000
    }
  ]
}'

API Documentation

Jianying Assistant Client

The Jianying Assistant client provides a convenient desktop interface. Here are the startup methods:

macOS Sandbox Permissions Guide

When running on macOS, the application may request access permissions for specific folders. Please follow these steps:

  1. If permission prompts appear during the first run, allow the application to access the required folders
  2. For manual configuration, go to System Preferences > Security & Privacy > Privacy > Folder Access
  3. Ensure the CapCut Mate application is added to the allowed list

For more details, please refer to the macOS Sandbox Permissions Configuration Guide.

  1. Install Dependencies
# Switch npm mirror source - for Windows
set ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/

# Switch yarn mirror source - for Linux or macOS
export ELECTRON_MIRROR="https://npmmirror.com/mirrors/electron/"

# Install dependencies
npm install --verbose
  1. Start the Project
npm run web:dev
npm start

Open Source Community Discussion Group

  • WeChat Group:

    Jianying Assistant

Business Cooperation


Language Switch

中文版 | English

S
Description
开源剪映小助手|剪映API | 扣子插件 | Open-source CapCut automation toolkit to generate & download draft files. | skills
Readme Apache-2.0 61 MiB
Languages
Python 95.1%
JavaScript 4.3%
Less 0.5%