mirror of
https://github.com/Hommy-master/capcut-mate.git
synced 2026-06-15 15:42:27 +08:00
3.5 KiB
3.5 KiB
SAVE_DRAFT API Documentation
🌐 Language Switch
Interface Information
POST /openapi/capcut-mate/v1/save_draft
Function Description
Save Jianying draft. This interface is used to save the current draft state, ensuring that edited content is persistently stored. Usually called after completing a series of editing operations to prevent loss of edited content.
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 | ✅ | - | Draft URL to be saved |
Parameter Details
draft_url
- Type: String
- Required: Yes
- Format: Complete draft URL, usually returned by create_draft interface
- Example:
https://capcut-mate.jcaigc.cn/openapi/capcut-mate/v1/get_draft?draft_id=2025092811473036584258
Response Format
Success Response (200)
{
"draft_url": "https://capcut-mate.jcaigc.cn/openapi/capcut-mate/v1/get_draft?draft_id=2025092811473036584258"
}
Response Field Description
| Field | Type | Description |
|---|---|---|
| draft_url | string | Saved draft URL, usually the same as the URL in the request |
Error Response (4xx/5xx)
{
"detail": "Error message description"
}
Usage Examples
cURL Examples
1. Basic Save Draft
curl -X POST https://capcut-mate.jcaigc.cn/openapi/capcut-mate/v1/save_draft \
-H "Content-Type: application/json" \
-d '{
"draft_url": "https://capcut-mate.jcaigc.cn/openapi/capcut-mate/v1/get_draft?draft_id=2025092811473036584258"
}'
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 |
| 500 | Save failed | Internal service error | Contact technical support or retry later |
| 503 | Service unavailable | System maintenance | Retry later |
Notes
- URL Validity: Ensure the passed draft_url is valid and exists
- Network Stability: Save operation requires stable network connection
- Frequency Control: Avoid overly frequent save operations
- Concurrency Safety: Concurrent saves of the same draft may cause conflicts
Workflow
- Validate draft_url parameter
- Check if draft exists
- Get current draft state
- Persistently save draft data
- Return save result
Related Interfaces
📚 Project Resources
GitHub: https://github.com/Hommy-master/capcut-mate
Gitee: https://gitee.com/taohongmin-gitee/capcut-mate