mirror of
https://github.com/Hommy-master/capcut-mate.git
synced 2026-06-20 16:46:08 +08:00
4.8 KiB
4.8 KiB
GEN_VIDEO API Documentation
🌐 Language Switch
Interface Information
POST /openapi/capcut-mate/v1/gen_video
Function 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.
More Documentation
📖 For more detailed documentation and tutorials, please visit: https://docs.jcaigc.cn
Request Parameters
{
"draft_url": "https://capcut-mate.jcaigc.cn/openapi/capcut-mate/v1/get_draft?draft_id=2025092811473036584258"
}
Parameter Description
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| draft_url | string | ✅ | - | Complete URL of the target draft |
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)
{
"message": "Video generation task submitted, please use draft_url to check progress"
}
Response Field Description
| Field | Type | Description |
|---|---|---|
| message | string | Response message |
Error Response (4xx/5xx)
{
"detail": "Error message description"
}
Usage Examples
cURL Examples
1. Basic Video Generation
curl -X POST https://capcut-mate.jcaigc.cn/openapi/capcut-mate/v1/gen_video \
-H "Content-Type: application/json" \
-d '{
"draft_url": "YOUR_DRAFT_URL"
}'
Error Code Description
| Error Code | Error Message | Description | Solution |
|---|---|---|---|
| 400 | draft_url is required | Missing draft URL parameter | Provide a valid draft_url |
| 400 | Invalid draft_url format | URL format is incorrect | Check if URL format is correct |
| 404 | Draft does not exist | Specified draft cannot be found | Confirm that draft URL is correct and exists |
| 400 | Draft content is empty | Draft contains no exportable content | Ensure draft contains video, audio or image materials |
| 400 | Material inaccessible | Material files in draft cannot be downloaded | Check if material URLs are valid |
| 500 | Video rendering failed | Error occurred during video processing | Check draft content or contact technical support |
| 500 | Audio processing failed | Error occurred during audio mixing | Check audio format or contact technical support |
| 500 | Encoding failed | Final video encoding failed | Contact technical support |
| 503 | Service busy | Rendering server overloaded | Retry later |
| 504 | Processing timeout | Video generation timed out | Simplify draft content or retry later |
| 500 | Video generation task submission failed | Internal processing error | 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