API Documentation

Our API provides the ability through which you can extend your own technologies with the capabilities of our cloud nfrastructure. This allows you to integrate our platform with other software or interfaces for the purpose of automating the manner through which your media is managed.

1. Authentication
2. File Status
3. Upload
4. Files Management

Upload

The upload function allows the sumbission of files, via a POST http request.

API URL

http://www.videohut.to/api/upload.php

Output

Output Variable Visible Details
status=>ok
post_url=>{url}
finish_url={url}
On Success Provides the URLs for submiting the file and for saving the upload.


POST URL

Available Variables

Variable Name Required Details
fileselect Yes Thie parameter contains the uploaded file.

Output

status=>ok
info=>finished
session={session}
On Success The upload was successful and you can continue to step 2.
status=>error
info=>Invalid file type.
On Error The file type is not allowed.
status=>error
info=>Invalid Session ID
On Error The session_id was not generated by our system.
status=>error
info=>file error
On Error The upload was not successful.


FINISH URL

This request is done to the finish_url, in order to save the file and receive the video id and url. No new parameters are added.
Output Variable Visible Details
status=>ok
video_url=>{url}
video_id={id}
screens={screenshots array}
On Success The upload is successful
status=>error
info=>Invalid Session ID/td>
On Error The session_id is invalid.
status=>error
info=>Upload not finished
On Error The POST upload is not finished yet.
status=>error
info=>Invalid upload session key
On Error The upload key is invalid.
status=>error
info=>The daily upload limit has been reached. Please try again tomorrow!
On Error Daily upload limit reached
status=>error
info=>The size of the file is bigger than the allowed limit.
On Error The size of the file is bigger than the allowed limit.
status=>error
info=>Unknown file hash
On Error The file could not be hashed.
status=>error
info=>The file is not allowed in our system."
On Error The file has been banned from our system.
status=>error
info=>Invalid file codec
On Error The file cannot be converted.

Sample API Request and Output

Request

http://{some_ip}/upload.php?upload_key=af2fe893e0a167486b27f166bbfd512e&uid=1&session_id=34adad348280b3c738c5f6de423aa8da

Output

{"status":"ok","video_url":"http:\/\/www.videohut.to\/v\/557ec65e00000","video_id":"557ec65e00000","screens":["http:\/\/{some_ip}\/thumbs\/e2dc1c7ae111111071e0412b38b1d-0.jpg","http:\/\/{some_ip}\/thumbs\/e2dc1c7ae111111071e0412b38b1d-1.jpg","http:\/\/{some_ip}\/thumbs\/e2dc1c7ae111111071e0412b38b1d-2.jpg","http:\/\/{some_ip}\/thumbs\/e2dc1c7ae111111071e0412b38b1d-3.jpg","http:\/\/{some_ip}\/thumbs\/e2dc1c7ae111111071e0412b38b1d-4.jpg"]}