CapCut Mate API

July 28, 2026 Β· View on GitHub

🌐 Language Switch

δΈ­ζ–‡η‰ˆ | English


Project Introduction

CapCut Mate API is a completely open-source and free Jianying draft automation assistant built on FastAPI, supporting independent deployment. This project focuses on empowering large models with basic video editing capabilities, providing out-of-the-box video editing Skills, and has fully automated the entire Jianying core functionality workflow. It can directly connect with large models to achieve diverse intelligent video editing, enabling ordinary users to quickly create professional and advanced video works.

Flexible project usage: Can be independently deployed, or combined with Coze or n8n to build automated workflows, and can also connect with Jianying to achieve cloud rendering, directly generating final videos from drafts.

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

Docker Deployment

πŸ“Ί Video Tutorial: CapCut Mate Private Deployment Complete Tutorial

git clone https://github.com/Hommy-master/capcut-mate.git
cd capcut-mate
docker-compose pull && docker-compose up -d

After deployment, access the API documentation at: http://localhost:30000/docs

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

InterfaceFunctionDescriptionDocumentation Link
create_draftCreate DraftCreate a new Jianying draft project, set canvas sizeπŸ“– View Documentation
save_draftSave DraftSave current draft state, ensure edit content persistenceπŸ“– View Documentation
get_draftGet DraftGet draft file list and detailed informationπŸ“– View Documentation

πŸŽ₯ Video Materials

InterfaceFunctionDescriptionDocumentation Link
add_videosAdd VideosBatch add video materials, support cropping, scaling, effectsπŸ“– View Documentation
add_imagesAdd ImagesBatch add image materials, support animations and transition effectsπŸ“– View Documentation
add_stickerAdd StickersAdd decorative stickers, support position and size adjustmentπŸ“– View Documentation

🎡 Audio Processing

InterfaceFunctionDescriptionDocumentation Link
add_audiosAdd AudiosBatch add audio materials, support volume and fade in/outπŸ“– View Documentation
get_audio_durationGet Audio DurationGet precise duration information of audio filesπŸ“– View Documentation

πŸ“ Text Subtitles

InterfaceFunctionDescriptionDocumentation Link
add_captionsAdd CaptionsBatch add captions, support keyword highlighting and style settingsπŸ“– View Documentation
add_text_styleText StyleCreate rich text styles, support keyword colors and fontsπŸ“– View Documentation

✨ Effects & Animations

InterfaceFunctionDescriptionDocumentation Link
add_effectsAdd EffectsAdd visual effects, such as filters, borders, dynamic effectsπŸ“– View Documentation
add_keyframesKeyframe AnimationCreate property animations for position, scale, rotation, etc.πŸ“– View Documentation
add_masksMask EffectsAdd various shape masks, control visible areas of the screenπŸ“– View Documentation

🎨 Animation Resources

InterfaceFunctionDescriptionDocumentation Link
get_text_animationsText AnimationsGet available text entrance, exit, and loop animationsπŸ“– View Documentation
get_text_effectsText EffectsGet available decorative text flower effects listπŸ“– View Documentation
get_image_animationsImage AnimationsGet available image animation effects listπŸ“– View Documentation

🎬 Video Generation

InterfaceFunctionDescriptionDocumentation Link
gen_videoGenerate VideoSubmit video rendering task, asynchronous processingπŸ“– View Documentation
gen_video_statusQuery StatusQuery the progress and status of video generation tasksπŸ“– View Documentation

πŸš€ Quick Tools

InterfaceFunctionDescriptionDocumentation Link
easy_create_materialQuick CreationAdd multiple types of materials at once, simplify creation processπŸ“– View Documentation

πŸ› οΈ Utility Tools

InterfaceFunctionDescriptionDocumentation Link
get_urlExtract URLExtract URL information from input contentπŸ“– View Documentation
search_stickerSearch StickerSearch sticker materials by keywordπŸ“– View Documentation
objs_to_str_listObjects to String ListConvert object list to string list formatπŸ“– View Documentation
str_list_to_objsString List to ObjectsConvert string list to object list formatπŸ“– View Documentation
str_to_listString to ListConvert string to list formatπŸ“– View Documentation
timelinesCreate TimelinesGenerate timeline configurations for video editingπŸ“– View Documentation
audio_timelinesAudio TimelinesCalculate timelines based on audio durationsπŸ“– View Documentation
audio_infosAudio InformationGenerate audio information from URLs and timelinesπŸ“– View Documentation
imgs_infosImage InformationGenerate image information from URLs and timelinesπŸ“– View Documentation
caption_infosCaption InformationGenerate caption information from text and timelinesπŸ“– View Documentation
effect_infosEffect InformationGenerate effect information from names and timelinesπŸ“– View Documentation
keyframes_infosKeyframe InformationGenerate keyframe information from configurationsπŸ“– View Documentation
video_infosVideo InformationGenerate video information from URLs and timelinesπŸ“– View Documentation

API Usage Examples

Workflow Examples

Explore real-world workflow examples to learn how to integrate CapCut Mate with automation platforms like Coze and n8n:

πŸ‘‰ View Workflow 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

video_infos is a JSON string (not a nested JSON array). Each item must include video_url, start, and end (microseconds on the timeline). See add_videos for optional fields.

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": "[{\"video_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: Install the DMG (Unsigned Package)

After downloading the .dmg from Releases, macOS may show this when you try to open or install:

"Jianying Assistant" is damaged and can't be opened. You should move it to the trash.

Don't worry β€” the app is NOT actually damaged, and do NOT move it to the Trash. This is a misleading macOS security warning for unsigned apps. Follow these steps once to fix it:

What this does: Removes macOS's quarantine flag so you can open and install normally.

StepWhat to do
1Press Command + Space, type Terminal, press Enter
2Type xattr -cr β€” keep the trailing space, do not press Enter yet
3Drag the .dmg file into the Terminal window (the full path fills in automatically)
4Press Enter to run the command
5Double-click the .dmg again β€” mount it, drag the app to Applications, then open it

Still seeing the same error after installing? Repeat steps 2–4, but drag /Applications/Jianying Assistant.app (or the app name shown in the error) into Terminal instead.

⚠️ Only run this on installers you trust (e.g. official releases from this project).

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

Contact

TypeMethodDescription
πŸ“± WeChat Group
Jianying Assistant
Open Source Community Discussion Group
πŸ’¬ WeChat
Technical Support WeChat
Business Cooperation
πŸ“§ Emailtaohongmin51@gmail.comTechnical Support