主题切换
GEN_VIDEO API Documentation
🌐 Language Switch
Interface Information
POST /openapi/capcut-mate/v1/gen_videoFunction Description
Submit video generation task. This interface uses asynchronous processing mode, immediately returning task submission status, with video generation performed in the background. Supports task queuing to ensure system stability.
Request Parameters
json
{
"draft_url": "https://capcut-mate.jcaigc.cn/openapi/capcut-mate/v1/get_draft?draft_id=2025092811473036584258",
"apiKey": "123e4567-e89b-12d3-a456-426614174000"
}Parameter Description
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| draft_url | string | ✅ | - | Complete URL of the target draft |
| apiKey | string | Per server config | - | A valid UUID; required when ENABLE_APIKEY=true, get one at https://jcaigc.cn |
Parameter Details
Draft URL Parameter
- draft_url: Complete URL address of the draft
- Format:
https://capcut-mate.jcaigc.cn/openapi/capcut-mate/v1/get_draft?draft_id={draft_ID} - Example:
"https://capcut-mate.jcaigc.cn/openapi/capcut-mate/v1/get_draft?draft_id=2025092811473036584258" - Acquisition Method: Obtained via Create Draft or Save Draft interfaces
- Format:
Response Format
Success Response (200)
json
{
"code": 0,
"message": "视频生成任务已提交,请使用draft_url查询进度"
}Response Field Description
| Field | Type | Description |
|---|---|---|
| message | string | Response message |
Error Response
json
{
"code": 2001,
"message": "Invalid draft URL"
}Usage Examples
cURL Examples
1. Basic Video Generation
bash
curl -X POST https://capcut-mate.jcaigc.cn/openapi/capcut-mate/v1/gen_video \
-H "Content-Type: application/json" \
-d '{
"draft_url": "https://capcut-mate.jcaigc.cn/openapi/capcut-mate/v1/get_draft?draft_id=2025092811473036584258",
"apiKey": "123e4567-e89b-12d3-a456-426614174000"
}'Error Code Description
| Error Code | Error Message | Description | Solution |
|---|---|---|---|
| 1001 | Parameter validation failed | apiKey is not a valid UUID, or a parameter has the wrong type | Check parameter types and required fields |
| 2001 | Invalid draft URL | draft_url is missing or does not contain a draft_id | Pass the draft_url returned by create_draft |
| 2035 | Insufficient account balance | The account has no more than 1 point | Recharge the account and retry |
| 2036 | Invalid apiKey | ENABLE_APIKEY=true and apiKey is missing | Log in at https://jcaigc.cn to get an apiKey |
| 9998 | Internal server error | Unexpected error while submitting the task | Retry later or contact technical support |
Notes
- Processing Time: Video generation is time-consuming, may take minutes to tens of minutes
- File Size: Draft complexity and number of materials affect processing time
- Network Stability: Ensure material URLs are stably accessible
- Timeout Settings: Suggest setting longer timeout or using polling mechanism
- Concurrency Limit: Avoid generating large numbers of videos simultaneously
- Storage Space: Generated video files may be large, pay attention to storage space
- URL Validity: Generated video_url may have time-based restrictions
- System Requirements: Video generation feature only available on Windows systems
Workflow
- Validate draft_url parameter
- Parse draft configuration file
- Download all required material files
- Arrange and process materials according to timeline
- Apply visual effects and transitions
- Mix audio tracks
- Render final video
- Encode and upload video file
- Return video URL
Related Interfaces
📚 Project Resources
GitHub: https://github.com/Hommy-master/capcut-mate
Gitee: https://gitee.com/taohongmin-gitee/capcut-mate
