General Information

Objects
Check Object Info

Upload
Upload a File

Remote Upload
Add a Remote Upload
Check a Remote Upload

General Information
our API URLs are in format https://api.raptu.com/v1/ where v1/ is our current version.
All Requests must be made via HTTP GET or POST requests
It requires a API key, which can found in your settings menu in the User Panel.
Response is always in JSON-Format, below is an example:

{
	"status": <status-code>,
	"msg": "<informational message>",
	"result": <result of the request>
}

STATUS CODES
200: Everything is OK. Request succeeded
400: Bad request (e.g. wrong parameters)
403: Permission denied (wrong api login/key, action on a file which does not belong to you, ...)
404: File not found (e.g. deleted video or wrong URL)
451: Unavailable For Legal Reasons (e.g. DMCA takedown, private video, etc) 50x: Server errors. You should not see this, but be prepared.

Check Object Info
check the status of a link/embed, e.g. if the video is online

REQUEST SYNTAX
https://api.raptu.com/v1/objects.php?ac=info&code={object_code}&apikey={your_api_key}

PARAMETERS
Name Description Example Required
object_code The Object-ID of a video 2OtDWmPw (single) or 2OtDWmPw,ur9v89nX, (seperated by commas) Yes
apikey API-Key 098f6bcd4621d373cade4e832627b4f6 No

EXAMPLE RESPONSE
{
    "status": 200,
    "msg": "OK",
    "result": {
       "3FOYXUJCD": {
            "code": "2OtDWmPw",
            "status": 200,
            "name": "Elysium_trailer_1-4K-HDTN.mp4",
            "description": ""
        }
    }
}

Upload a Video
upload a video

REQUEST SYNTAX
https://upload.raptu.com/upload.rapidvideo.com/upload/index.php

PARAMETERS
Name Description Example Standard value Required
user_id Your User-ID (see user settings) 1 - Yes
files[] Array for input files files[0] = contents of first file Yes

EXAMPLE SCRIPT (PHP)
$target_url = 'http://upload.raptu.com/upload/index.php';
//This needs to be the full path to the file you want to send.
$file_name_with_full_path = realpath('./testfile.bin');

if (function_exists('curl_file_create'))
{ // php 5.5+
  $cFile = curl_file_create($file_name_with_full_path);
} else { // 
  $cFile = '@' . realpath($file_name_with_full_path);
}

$post = array('user_id' => '1','files[0]'=> $cFile);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$target_url);
curl_setopt($ch, CURLOPT_POST,1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result=curl_exec($ch);
curl_close ($ch);

$json = json_decode($result, true);
if($json["files"][0]["url"])
{
	echo $json["files"][0]["url"]."\n";
}

EXAMPLE RESPONSE




Add a Remote Upload
upload a video via Remote Upload System

REQUEST SYNTAX
https://api.raptu.com/v1/remote.php?ac=add&user_id={user_id}&url={url}

PARAMETERS
Name Description Example Standard value Required
user_id Your User-ID (see user settings) 1 - Yes
url URL Source http://download.blender.org/demo/movies/Sintel.2010.1080p.mkv - Yes

EXAMPLE RESPONSE
{
    "status": 200,
    "msg": "OK",
    "result": {
            "id": "123",
            "status": "OK"
    }
}

Check a Remote Upload
check status from Remote Upload System

REQUEST SYNTAX
https://api.raptu.com/v1/remote.php?ac=check&user_id={user_id}&remote_id={remote_id}

PARAMETERS
Name Description Example Standard value Required
user_id Your User-ID (see user settings) 1 - Yes
remote-id Remote-ID from previous response, that you added a link before 1 - Yes

EXAMPLE RESPONSE
{
	"status":"OK",
	"result": {
		"total_filesize":"104857600",
		"transfer_filesize":"104335557",
		"progress":"100",
		"done":"1",
		"object_code":"FFABCDEFGH"
	}
}