> ## Documentation Index
> Fetch the complete documentation index at: https://developers.aquilax.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 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. 🚀



## OpenAPI

````yaml post /api/v2/ai/securitron
openapi: 3.0.0
info:
  title: AquilaX AI API Docs
  version: '2.0'
  description: >
    Welcome to the API documentation for AquilaX. Integrate AquilaX for advanced
    data processing and analytics in your applications. Key features include
    seamless data ingestion, powerful processing capabilities, analytics tools,
    real-time updates, and robust security measures. Get started with API keys,
    explore endpoints, understand formats, and implement error
    handling.Authorization is required for all end-points, excluding the one
    under Public Section. To authenticate, a Personal Access Token `PAT` must be
    included in the request header with the name `X-AX-KEY`. Happy coding!
servers:
  - url: https://aquilax.ai
    description: Cloud Instance
security:
  - ApiKeyAuth: []
tags:
  - name: Health
    description: Endpoints for metrics and health check
  - name: Profile
    description: Endpoints for managing user profiles
  - name: Public Scan
    description: Endpoints for scanning a public git repo
  - name: Admin
    description: Endpoints for AquilaX Worker
paths:
  /api/v2/ai/securitron:
    post:
      tags:
        - Public Scan
      summary: Securitron Bot
      description: >-
        Securitron is built on a series of specialized Small Language Models
        (SLMs), designed to enhance user experience and streamline interactions
        within the AquilaX ecosystem. 🚀
      parameters:
        - name: org
          in: query
          required: true
          description: Organization ID
          schema:
            type: string
        - name: group
          in: query
          required: true
          description: Group ID
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: Data to submit on your request to Securitron
              properties:
                prompt:
                  type: string
                  description: A user prompt
                  example: Who am i?
                  default: Who am i?
                sessione_id:
                  type: string
                  description: >-
                    A random ID defined from the client, to be used as a
                    sessione_id
                  example: '123'
                  default: '123'
                stream:
                  type: boolean
                  description: '`true` or `false`, to receive the data in streaming'
                  example: false
                  default: true
      responses:
        '200':
          description: Successful response with a structured text output
          content:
            text/markdown:
              schema:
                type: string
                description: >
                  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)
                  ```
                example: |
                  Hey Name Surname!  
                  You authenticated via google using `your_email@aquilax.io`. 
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-AX-KEY

````