主题切换
Agent Call Guide
Language Switch
Rules for LLM / agent callers. Full human API pages live in the sidebar; this page only covers what automatic calling must get right.
Hard rules
- Base URL is
https://capcut-mate.jcaigc.cn, path prefix/openapi/capcut-mate/v1/. - Time unit is microseconds: 1 second =
1000000. A 5-second clip isstart: 0, end: 5000000. - Call
create_draftfirst, then pass the returneddraft_urlon every later write. Do not invent adraft_id. - List fields are JSON strings, not object arrays:
video_infos,audio_infos,image_infos,captions,keyframes,effect_infos,filter_infos. - Only
gen_video(export, 0.3 CNY/min) andupload_file(upload, 0.0005 CNY/MB) are billed, and both needapiKey(UUID). All other endpoints are free. - Export is async:
gen_videoonly submits the job. Pollgen_video_status.
Default workflow
POST /create_draft→ keepdraft_url- Call
add_videos/add_images/add_audios/add_captionsas needed - Optional:
add_effects/add_filters/add_keyframes/add_masks POST /gen_video(includeapiKeyfor hosted export)- Poll
POST /gen_video_statusevery 3–5s untilcompletedorfailed - On success, use
video_url
Do not call unless assembling Coze/n8n JSON
timelines,audio_timelinesvideo_infos,audio_infos,imgs_infos,caption_infos,effect_infos,filter_infos,keyframes_infosstr_to_list,str_list_to_objs,objs_to_str_list
Build the JSON string yourself and pass it to add_*.
Minimal example: vertical short video
bash
curl -X POST https://capcut-mate.jcaigc.cn/openapi/capcut-mate/v1/create_draft \
-H "Content-Type: application/json" \
-d '{"width":1080,"height":1920}'
curl -X POST https://capcut-mate.jcaigc.cn/openapi/capcut-mate/v1/add_videos \
-H "Content-Type: application/json" \
-d '{
"draft_url": "YOUR_DRAFT_URL",
"video_infos": "[{\"video_url\":\"https://example.com/clip.mp4\",\"start\":0,\"end\":5000000}]"
}'
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","apiKey":"123e4567-e89b-12d3-a456-426614174000"}'
curl -X POST https://capcut-mate.jcaigc.cn/openapi/capcut-mate/v1/gen_video_status \
-H "Content-Type: application/json" \
-d '{"draft_url":"YOUR_DRAFT_URL"}'Status machine
| status | meaning | next step |
|---|---|---|
| pending | queued | keep polling |
| processing | rendering | keep polling |
| completed | success | read video_url |
| failed | error | read error_message |
