POST /openapi/capcut-mate/v1/create_draft
Create a Jianying draft. This interface is used to create a new Jianying draft project, allowing customization of video width and height. After successful creation, it returns the draft URL and help document URL, providing the foundation for subsequent video editing operations.
📖 For more detailed documentation and tutorials, please visit: https://docs.jcaigc.cn
{
"width": 1920,
"height": 1080
}| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| width | number | ❌ | 1920 | Video width (pixels), must be greater than or equal to 1 |
| height | number | ❌ | 1080 | Video height (pixels), must be greater than or equal to 1 |
-
width: Width of the draft video
- Minimum: 1 pixel
- Recommended common values: 1920, 1280, 720
- Supports custom sizes
-
height: Height of the draft video
- Minimum: 1 pixel
- Recommended common values: 1080, 720, 480
- Supports custom sizes
| Resolution Name | Width | Height | Application Scenario |
|---|---|---|---|
| 1080P | 1920 | 1080 | HD video production |
| 720P | 1280 | 720 | SD video production |
| 4K | 3840 | 2160 | Ultra HD video production |
| Vertical Short Video | 1080 | 1920 | Mobile short videos |
| Square | 1080 | 1080 | Social media content |
{
"draft_url": "https://cm.jcaigc.cn/openapi/v1/get_draft?draft_id=2025092811473036584258",
"tip_url": "https://help.assets.jcaigc.cn/draft-usage"
}| Field | Type | Description |
|---|---|---|
| draft_url | string | Newly created draft URL, used for subsequent editing operations |
| tip_url | string | Draft usage help documentation URL |
{
"detail": "Error message description"
}curl -X POST https://capcut-mate.jcaigc.cn/openapi/capcut-mate/v1/create_draft \
-H "Content-Type: application/json" \
-d '{}'curl -X POST https://capcut-mate.jcaigc.cn/openapi/capcut-mate/v1/create_draft \
-H "Content-Type: application/json" \
-d '{
"width": 1280,
"height": 720
}'curl -X POST https://capcut-mate.jcaigc.cn/openapi/capcut-mate/v1/create_draft \
-H "Content-Type: application/json" \
-d '{
"width": 1080,
"height": 1920
}'| Error Code | Error Message | Description | Solution |
|---|---|---|---|
| 400 | width must be greater than or equal to 1 | Invalid width parameter | Provide a width value greater than or equal to 1 |
| 400 | height must be greater than or equal to 1 | Invalid height parameter | Provide a height value greater than or equal to 1 |
| 400 | Parameter type error | Parameter type is incorrect | Ensure width and height are numeric types |
| 500 | Draft creation failed | Internal service error | Contact technical support |
| 503 | Service unavailable | System maintenance | Retry later |
- Parameter Validation: width and height must be positive integers
- Resolution Recommendation: Suggest using common video resolutions to ensure compatibility
- Performance Consideration: Ultra-high resolution may affect subsequent processing performance
- Storage Usage: High-resolution drafts will occupy more storage space
- URL Validity: The returned draft_url has a certain validity period
- Receive and validate request parameters
- Create draft basic structure
- Set canvas size
- Generate draft URL
- Return draft information and help document link
📚 Project Resources
GitHub: https://github.com/Hommy-master/capcut-mate
Gitee: https://gitee.com/taohongmin-gitee/capcut-mate