API Documentation

Learn how to easily integrate our premium link generator directly into your application.

1. Authentication

All requests require an active API key and must originate from the Domain/IP bound to your account. Include your API key in the headers of your HTTP request.

Header parameter required:

x-api-key: YOUR_API_KEY

2. Generate Premium Link

POST /api.php?action=generate

Convert a standard hoster link into a premium downloadable stream.

Request JSON Body

{
  "link": "https://example-host.com/file.rar"
}

Success Response (200 OK)

{
  "status": "success",
  "message": "Link generated successfully",
  "data": {
    "filename": "movie.mp4",
    "filesize": 1048576,
    "link": "https://premiumlinkgenerator.net/stream/..."
  }
}

Error Responses (400 / 401 / 403 / 429)

{
  "status": "error",
  "message": "Invalid or inactive API Key"
}

3. Code Examples

PHP (cURL)

<?php
$payload = json_encode(['link' => 'https://example.com/file.rar']);

$ch = curl_init('https://yourdomain.com/api.php?action=generate');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    'x-api-key: YOUR_API_KEY'
]);

$response = curl_exec($ch);
curl_close($ch);

$data = json_decode($response, true);
print_r($data);
?>

Node.js / JavaScript (Fetch)

fetch('https://yourdomain.com/api.php?action=generate', {
    method: 'POST',
    headers: {
        'Content-Type': 'application/json',
        'x-api-key': 'YOUR_API_KEY'
    },
    body: JSON.stringify({
        link: 'https://example.com/file.rar'
    })
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));