FFmpeg Media · FFmpeg Media

Video to GIFComing Soon

🚧 Coming soon — docs preview only, online run not yet available.
📌 What is thisConvert a video segment to an animated GIF.
💡 When to useUse to make GIFs or animated previews.

Endpoints

UsageMethodPath
Submit taskPOST/v1/ffmpeg/to_gif
Query ResultGET/v1/ffmpeg/info?id={taskId}
Recommended polling intervalPoll every 3-5s (response includes progress 0-100) until status = succeeded / failed. Single-task timeout is 300s with auto-refund.

Request Parameters

ParamTypeRequiredDescription
inputUrlstringRequiredInput media URL, must be on the platform CDN allowlist (upload first to obtain it)
fpsintegerFPS [5,25], default 12
widthintegerWidth px [160,720], aspect-kept, default 480
startnumberStart sec, default 0
durationnumberClip length (sec), default full length
webhookUrlstringCompletion webhook URL (optional)

Request Example

curl -X POST https://api.cqtai.com/v1/ffmpeg/to_gif \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{ "inputUrl": "https://cdn.novapi.ai/tmp/video.mp4", "fps": 12, "width": 480, "start": 2, "duration": 5 }'
# -> { "code":200, "data":"<taskId>" }

Response Example

{
  "code": 200,
  "msg": "success",
  "data": {
    "taskId": "<taskId>",
    "operation": "transcode",
    "status": "succeeded",
    "progress": 100,
    "resultUrl": "https://cdn.novapi.ai/ffmpeg/xxx.mp4",
    "costPoints": 3,
    "errorMsg": null
  }
}

Billing & Credits

Factor 1.2, billed by output length (x your user rate). Auto-refunded on failure.