Optimizer API

Complete API reference for Crunch’s Video Optimization service.

Authentication

Every request to the API is authenticated via an Access Token and Secret Token. Token based authentication works by providing the Access Token Secret token in the API request. For More information Click Here.

									--user $ACCESS_TOKEN_ID:$SECRET_KEY
								

POST Create Job

https://api.crunchmediaworks.com/vod/v1/video/job

A job refers to a media content/video that is optimized through Crunch. This endpoint creates a job allowing users to optimize their input videos via Crunch’s optimization API.

Body Parameters

ParameterTypeDescription
input_urlstringURL or web address (which is publicly accessible ) of a video file that Crunch should optimize.
Required: true
crunch_modestringIf optimizer is selected then input video will be optimized to reduce video size.
Required: true

												
													curl -L -X POST 'https://api.crunchmediaworks.com/vod/v1/video/job' \
													-H 'Content-Type: application/json' \
													-u $ACCESS_TOKEN_ID:$SECRET_KEY \
													-d '{
													    "input_url": "https://cmw-demo-videos-bucket.s3.us-east-2.amazonaws.com/1080p/Outdoor.MOV",
													    "crunch_mode": "optimizer"
													}'
												
											
												
												
											

GET Get Job Status

https://api.crunchmediaworks.com/vod/v1/video/job/:asset_id

This endpoint retrieves the details of a job that has previously been created. Given the unique asset_id, Crunch will return the corresponding asset status.

Path Parameters

ParameterTypeDescription
asset_idstringAn asset_id for the previously created job.

Response Parameters

ParameterTypeDescription
statusstringstatus indicates current status of your video which you have submitted.Possible value will be one from this : PREPROCESSING, TRANSCODING, COMPLETED, FAILED

												
													curl -L -X GET 'https://api.crunchmediaworks.com/vod/v1/video/job/5545eede-6928-48c0-b2f7-08e31fac15ad' \
													-u $ACCESS_TOKEN_ID:$SECRET_KEY
												
											
											
												
											
										

  •     Upscaler API
  • Live Stream API