Videogram API

VIDEOGRAM CREATE API

OVERVIEW

Accepts standard form POST, gets the remotely-hosted movie via server-to-server, processes it into a videogram and sends an email when ready. Processing time varies depending on video length and server load, but is usually less than 5 minutes.

Pre-Req:

Create a free publisher account at http://cinemacraft.tv/solutions#register-form and then mail API@videogram.com for the API_KEY

API CALL

http://www.videogram.com/api/videogram/

DESCRIPTION

Accepts: application/x-www-form-urlencoded; charset=utf-8 method: POST (all parameters required)

api_key: <xxx>

url:(Accepts top-page / share urls from most services like Vimeo, Dailymotion, Youtube etc. or a direct url of any streamable .mp4 file).

title: Title of the Video.

email: A message will be sent to this address when the video has been processed, the id and url of the finished videogram will be in the email.

RESPONSE

200 : Ok + detailed info in JSON format

400 : Bad Request

403 : Forbidden ( i.e. bad / missing api key )

500 : Internal Server Error 400 series responses include details in JSON format.

500 series responses contain no useful information in the response body.

EXAMPLE:

Result:

If you want to generate a plain link to the player page, use the vgsurl value. If you want the link to autoplay from a particular time, append ?autoplay=12345 to vgplayerurl, where the number is the desired autoplay time in milliseconds. The short url does not pass the query string. Embed urls can be made simply by vgplayerurl.replace(‘comic’,’embed’) and also support autoplay. Standard embed iframe code looks like this

 

You must declare width and height, but you don’t have to do it inline. Heights such as 80vh work quite well, and the width in the above example allows the embed to flex with the page.


VIDEOGRAM LIST API

OVERVIEW

Accepts standard GET request, replies with JSON-encoded information.

API CALL

http://www.videogram.com/api/channel/get/videos/?api_key=<xxx>&offset=0&limit=10

DESCRIPTION

accepts: text/plain method:

GET (all parameters required)

api_key: <xxx>

offset: Start at this value if you want to do list paging. Normally 0. limit: you get this many items back.

RESPONSE

200 : Ok + detailed info in JSON format. see below for example

400 : Bad Request

403 : Forbidden ( i.e. bad / missing api key )

500 : Internal Server Error 400 series responses include details in JSON format. 500 series responses contain no useful information in the response body.

EXAMPLE:

http://www.videogram.com/api/channel/get/videos/?api_key=xxx

 LIST VIDEOGRAM OUTPUT

 

NOTES

If you want to generate a plain link to the player page, use the vgsurl value. If you want the link to autoplay from a particular time, append ?autoplay=12345 to vgplayerurl, where the number is the desired autoplay time in milliseconds. The short url does not pass the query string. Embed urls can be made simply by vgplayerurl.replace(‘comic’,’embed’) and also support autoplay. Standard embed iframe code looks like this

You must declare width and height, but you don’t have to do it inline. Heights such as 80vh work quite well, and the width in the above example allows the embed to flex with the page.