MixCut generation
Introduction
Send type: video, model: mixcut, a list of public source video URLs in input.urls and a natural-language input.requirement. The submit probes every source, reserves credits for the measured input plus the 10-minute output cap, and returns HTTP 202 with job.id and an initial queued/running state, without waiting for rendering. Poll GET /v1/generations/{id}; state moves queued → running → done/failed, step moves analyze → generate → render → done, and a finished task carries video_url.
Request
curl -X POST https://api.anycap.io/v1/generations \ -H "Authorization: Bearer $ANYCAP_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: 6d2f9a1c-7b4e-4a8d-9f3c-2e5b8d1a7c60" \ -d '{"type":"video","model":"mixcut","input":{"urls":["https://mixcut-files.tos-cn-beijing.volces.com/ecommerce/8.mp4","https://mixcut-files.tos-cn-beijing.volces.com/ecommerce/9.mp4"],"requirement":"做一个22秒的产品种草短视频"}}'type
videomodel
mixcutinput.urls
input.requirement
Idempotency-Key
Response
{ "type": "video", "job": { "id": "6d2f9a1c-7b4e-4a8d-9f3c-2e5b8d1a7c60", "state": "queued", "status": "queued", "step": "analyze", "urls": [ "https://mixcut-files.tos-cn-beijing.volces.com/ecommerce/8.mp4", "https://mixcut-files.tos-cn-beijing.volces.com/ecommerce/9.mp4" ], "requirement": "做一个22秒的产品种草短视频", "input_seconds": 22, "reserved_microcredits": 1415000000, "created_at": "2026-11-02T08:00:00Z", "updated_at": "2026-11-02T08:00:00Z" }}The response wraps the task in job. input_seconds and output_seconds are the measured durations used for billing; reserved_microcredits is the hold created at submit; charged_microcredits appears after settlement. A failed task carries error and releases the hold.
Query progress and result
curl "https://api.anycap.io/v1/generations/$TASK_ID" -H "Authorization: Bearer $ANYCAP_API_KEY"Set TASK_ID to job.id from the create response (the Anycap UUID). Query every 3 seconds, waiting for each response before the next query. Keep polling queued/running. On done read job.video_url; on failed read job.error. video_url, output_seconds and completed_at are omitted until available. A temporary query error does not mean generation failed: retry GET, without submitting another POST. If a nonterminal job carries error, its submission outcome needs reconciliation; contact support and do not resubmit.
{ "type": "video", "job": { "id": "6d2f9a1c-7b4e-4a8d-9f3c-2e5b8d1a7c60", "state": "done", "status": "done", "step": "done", "video_url": "https://cdn.example.com/output.mp4", "output_seconds": 22 }}Errors
| HTTP | Body | What to do |
|---|---|---|
| 202 | type=video, job | Keep job.id; poll GET /v1/generations/{id}. |
| 200 | type=video, job.state=done/failed | Read job.video_url or job.error. |
| 400 | error.code=invalid_input | Fix urls/requirement; nothing was submitted or charged. |
| 402 | error.code=insufficient_credits | Add credits and retry. Nothing was submitted or charged. |
| 503 | error.code=temporarily_unavailable | Check recent tasks first; retry with the same request key. |