Skip to main content
POST
/
kvm
/
v2
/
get
/
screenshot
Get VPS Screenshot
curl --request POST \
  --url https://{api_host}/kvm/v2/get/screenshot \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data signature=session_signature_12345 \
  --data kvm_id=kvm_xxxxx_yyyyy \
  --data valid_until=1737476000
import requests

url = "https://{api_host}/kvm/v2/get/screenshot"

payload = {
"signature": "session_signature_12345",
"kvm_id": "kvm_xxxxx_yyyyy",
"valid_until": "1737476000"
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}

response = requests.post(url, data=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({
signature: 'session_signature_12345',
kvm_id: 'kvm_xxxxx_yyyyy',
valid_until: '1737476000'
})
};

fetch('https://{api_host}/kvm/v2/get/screenshot', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://{api_host}/kvm/v2/get/screenshot",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "signature=session_signature_12345&kvm_id=kvm_xxxxx_yyyyy&valid_until=1737476000",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://{api_host}/kvm/v2/get/screenshot"

payload := strings.NewReader("signature=session_signature_12345&kvm_id=kvm_xxxxx_yyyyy&valid_until=1737476000")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Content-Type", "application/x-www-form-urlencoded")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://{api_host}/kvm/v2/get/screenshot")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("signature=session_signature_12345&kvm_id=kvm_xxxxx_yyyyy&valid_until=1737476000")
.asString();
require 'uri'
require 'net/http'

url = URI("https://{api_host}/kvm/v2/get/screenshot")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "signature=session_signature_12345&kvm_id=kvm_xxxxx_yyyyy&valid_until=1737476000"

response = http.request(request)
puts response.read_body
{
  "status": "success",
  "data": "data:image/jpg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD...",
  "note": "var obj = JSON.parse(serverResponse); img.src=obj.data;"
}
{
"status": "error",
"message": "Invalid parameters provided."
}
{
"status": "error",
"message": "Unauthorized request."
}
{
"status": "error",
"message": "Access forbidden."
}
{
"status": "error",
"message": "Internal server error."
}

Body

application/x-www-form-urlencoded

Required parameters to fetch a screenshot for the VPS.

signature
string

The session signature obtained from the "Create AUTH-session" call.

Example:

"session_signature_12345"

kvm_id
string

The unique identifier of the KVM VPS to retrieve the screenshot from.
This value is specific to your VPS.

Example:

"kvm_xxxxx_yyyyy"

valid_until
string

The expiration timestamp for the session, obtained from the "Create AUTH-session" call.
Ensure that the session is valid and has not expired.

Example:

"1737476000"

Response

Screenshot retrieved successfully.

status
string
Example:

"success"

data
file

The screenshot image encoded in Base64 format.
Use the following example to display it in an img tag.

note
string

Example script to display the image.

Example:

"var obj = JSON.parse(serverResponse); img.src=obj.data;"

Last modified on December 17, 2025