POST
/
auto_clips
curl --request POST \
  --url https://api.video.dev/v1/auto_clips \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '{
  "source_media_id": "<string>",
  "prompt": "viral clips of 20 to 30 seconds",
  "webhook": {
    "url": "https://system.new/webhook/v1",
    "events": [
      "new_clips"
    ]
  }
}'
{
  "status": "processing",
  "run_id": "<string>",
  "source_media": {
    "status": "complete",
    "media_id": "<string>",
    "media_url": "https://storage.xyz/media.mp4",
    "media_info": {
      "type": "video",
      "duration_ms": 123,
      "fps": 123,
      "frame_count": 123,
      "width": 123,
      "height": 123,
      "channels": 123
    }
  },
  "webhook": {
    "url": "https://system.new/webhook/v1",
    "events": [
      "new_clips"
    ]
  }
}

Webhooks

Webhooks allow video.dev to notify your API when results are ready. This eliminates unnecessary requests made by polling, and can get results back faster.

Webhooks can be registered as part of the request and various events can be subscribed to get status of .

The following is a full list of all webhook events which can be subscribed.

EventDescription
new_clipsOccurs when a new clips are available
completeOccurs when auto clip creation completes
errorOccurs when auto clip creation has errors

The webhook will be POST to the URL you provided with a JSON payload. The payload will contain the event type and the details associated with the event.

Authorizations

X-API-Key
string
header
required

Body

application/json

use params.query to specify search query

The body is of type object.

Response

200 - application/json

Clip workflow initiated successfully

The response is of type object.