curl --request POST \
--url https://aquilax.ai/api/v2/ai/securitron \
--header 'Content-Type: application/json' \
--header 'X-AX-KEY: <api-key>' \
--data '
{
"prompt": "Who am i?",
"sessione_id": "123",
"stream": false
}
'import requests
url = "https://aquilax.ai/api/v2/ai/securitron"
payload = {
"prompt": "Who am i?",
"sessione_id": "123",
"stream": False
}
headers = {
"X-AX-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-AX-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({prompt: 'Who am i?', sessione_id: '123', stream: false})
};
fetch('https://aquilax.ai/api/v2/ai/securitron', 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://aquilax.ai/api/v2/ai/securitron",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'prompt' => 'Who am i?',
'sessione_id' => '123',
'stream' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-AX-KEY: <api-key>"
],
]);
$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://aquilax.ai/api/v2/ai/securitron"
payload := strings.NewReader("{\n \"prompt\": \"Who am i?\",\n \"sessione_id\": \"123\",\n \"stream\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-AX-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://aquilax.ai/api/v2/ai/securitron")
.header("X-AX-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"Who am i?\",\n \"sessione_id\": \"123\",\n \"stream\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://aquilax.ai/api/v2/ai/securitron")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-AX-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"Who am i?\",\n \"sessione_id\": \"123\",\n \"stream\": false\n}"
response = http.request(request)
puts response.read_body"Hey Name Surname! \nYou authenticated via google using `[email protected]`. \n"Securitron Bot
Securitron is built on a series of specialized Small Language Models (SLMs), designed to enhance user experience and streamline interactions within the AquilaX ecosystem. π
curl --request POST \
--url https://aquilax.ai/api/v2/ai/securitron \
--header 'Content-Type: application/json' \
--header 'X-AX-KEY: <api-key>' \
--data '
{
"prompt": "Who am i?",
"sessione_id": "123",
"stream": false
}
'import requests
url = "https://aquilax.ai/api/v2/ai/securitron"
payload = {
"prompt": "Who am i?",
"sessione_id": "123",
"stream": False
}
headers = {
"X-AX-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-AX-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({prompt: 'Who am i?', sessione_id: '123', stream: false})
};
fetch('https://aquilax.ai/api/v2/ai/securitron', 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://aquilax.ai/api/v2/ai/securitron",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'prompt' => 'Who am i?',
'sessione_id' => '123',
'stream' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-AX-KEY: <api-key>"
],
]);
$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://aquilax.ai/api/v2/ai/securitron"
payload := strings.NewReader("{\n \"prompt\": \"Who am i?\",\n \"sessione_id\": \"123\",\n \"stream\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-AX-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://aquilax.ai/api/v2/ai/securitron")
.header("X-AX-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"Who am i?\",\n \"sessione_id\": \"123\",\n \"stream\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://aquilax.ai/api/v2/ai/securitron")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-AX-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"Who am i?\",\n \"sessione_id\": \"123\",\n \"stream\": false\n}"
response = http.request(request)
puts response.read_body"Hey Name Surname! \nYou authenticated via google using `[email protected]`. \n"Authorizations
Body
Data to submit on your request to Securitron
Response
Successful response with a structured text output
Since the content type is always set to text/markdown, it should consistently be processed as such. This applies even if an API call fails with a status code other than 200βthe response body will still contain a markdown-formatted message conveying the necessary information to the user. The only exception is when the content type is set to stream; in that case, the content should still be treated as markdown but delivered in a streaming format.
Python code example to read the data in stream
import requests
url = "https://aquilax.ai/api/v2/<your_own_org>/securitron"
payload = {
"prompt": "what is sql injection?",
"group_id": "<your_own_group>",
"sessione_id": "<random session id>",
"stream": True
}
headers = {
"X-AX-KEY": "", # Add your API key here
"Content-Type": "application/json"
}
def stream_response(url, payload, headers):
"""
Sends a POST request with streaming enabled and processes the response in real-time.
"""
with requests.post(url, json=payload, headers=headers, stream=True) as response:
response.raise_for_status() # Ensure request was successful
for line in response.iter_lines():
if line:
decoded_line = line.decode('utf-8')
print(f"Received: {decoded_line}")
# Call the function
stream_response(url, payload, headers)
"Hey Name Surname! \nYou authenticated via google using[email protected]. \n"
