Headers

Header name Description
Content-Type
required
application/json
X-API-KEY
required
YOUR_API_KEY

Params

Param name Description
asset_id
required

Asset ID

Validations:

  • Must be a String

name
required

Name of the clip

Validations:

  • Must be a String

start_time
required

Start time of the video clip relative to the original media in milliseconds

Validations:

  • Must be a Integer

end_time
required

End time of the video clip relative to the original media in milliseconds

Validations:

  • Must be a Integer

Examples

// Successful request
POST /api/v2/assets/lMzPb1YQJmMvH91nGm7C/video_clips
{
  "name": "Clip 1",
  "start_time": 5000,
  "end_time": 25000
}
200
{
  "video_clip": {
    "id": 1,
    "name": "Clip 1",
    "start_time": 5000,
    "end_time": 25000
  }
}
// Asset not found
POST /api/v2/assets/:asset_id/video_clips
{
  "name": "Clip 1",
  "start_time": 5000,
  "end_time": 25000
}
404
{
  "error": "asset not found"
}
// Invalid parameters
POST /api/v2/assets/MQfm4NLTJ_Y1l_m_-Utr/video_clips
{
  "name": "Clip 1",
  "start_time": 26000,
  "end_time": 25000
}
400
{
  "error": "Validation failed: Start time must be less than or equal to 25000, End time must be greater than or equal to 26000"
}

Errors

Code Description
401 Unauthorized
404 Not found
500 Internal Server Error
422 Missing parameters