Altostrat Studio is here — the AI-native network operations IDE for engineers running production. Terminal, diagrams, runbooks, and Copilot in one workspace. Get started →
curl --request POST \
--url https://v1.api.altostrat.io/scripts/gen-ai \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "Create a firewall rule to block all incoming traffic on port 22 from the internet."
}
'{
"response": [
{
"content": "/ip firewall filter add action=drop chain=input in-interface=ether1 protocol=tcp dst-port=22;",
"error": null,
"destructive": true
}
],
"tokenUsage": {
"prompt": 75,
"completion": 30,
"total": 105
},
"response_id": "cmpl-8fV3x5m7y6z4w3v2u1t0s"
}Submits a natural language prompt to the AI engine to generate a MikroTik RouterOS script. The response includes the generated script content, a flag indicating if the script is potentially destructive, and any errors or warnings from the AI.
curl --request POST \
--url https://v1.api.altostrat.io/scripts/gen-ai \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "Create a firewall rule to block all incoming traffic on port 22 from the internet."
}
'{
"response": [
{
"content": "/ip firewall filter add action=drop chain=input in-interface=ether1 protocol=tcp dst-port=22;",
"error": null,
"destructive": true
}
],
"tokenUsage": {
"prompt": 75,
"completion": 30,
"total": 105
},
"response_id": "cmpl-8fV3x5m7y6z4w3v2u1t0s"
}Documentation Index
Fetch the complete documentation index at: https://altostrat.io/docs/llms.txt
Use this file to discover all available pages before exploring further.
Altostrat SDX API uses JWT Bearer tokens for authentication. Obtain a token via the Authentication API and include it in the Authorization header as 'Bearer {token}'.
The natural language prompt describing the desired script.
200"Create a firewall rule to block all incoming traffic on port 22 from the internet."
Was this page helpful?