Skip to content

GEN_VIDEO API Documentation ​

🌐 Language Switch ​

中文版 | English

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.

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 ​

ParameterTypeRequiredDefaultDescription
draft_urlstring✅-Complete URL of the target draft
apiKeystringPer 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

Response Format ​

Success Response (200) ​

json
{
  "code": 0,
  "message": "视频生成任务已提交,请使用draft_url查询进度"
}

Response Field Description ​

FieldTypeDescription
messagestringResponse 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 CodeError MessageDescriptionSolution
1001Parameter validation failedapiKey is not a valid UUID, or a parameter has the wrong typeCheck parameter types and required fields
2001Invalid draft URLdraft_url is missing or does not contain a draft_idPass the draft_url returned by create_draft
2035Insufficient account balanceThe account has no more than 1 pointRecharge the account and retry
2036Invalid apiKeyENABLE_APIKEY=true and apiKey is missingLog in at https://jcaigc.cn to get an apiKey
9998Internal server errorUnexpected error while submitting the taskRetry later or contact technical support

Notes ​

  1. Processing Time: Video generation is time-consuming, may take minutes to tens of minutes
  2. File Size: Draft complexity and number of materials affect processing time
  3. Network Stability: Ensure material URLs are stably accessible
  4. Timeout Settings: Suggest setting longer timeout or using polling mechanism
  5. Concurrency Limit: Avoid generating large numbers of videos simultaneously
  6. Storage Space: Generated video files may be large, pay attention to storage space
  7. URL Validity: Generated video_url may have time-based restrictions
  8. System Requirements: Video generation feature only available on Windows systems

Workflow ​

  1. Validate draft_url parameter
  2. Parse draft configuration file
  3. Download all required material files
  4. Arrange and process materials according to timeline
  5. Apply visual effects and transitions
  6. Mix audio tracks
  7. Render final video
  8. Encode and upload video file
  9. Return video URL

Language Switch ​

中文版 | English