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

# Vulnerability Review

> Sends vulnerability details and source code to the AI service, which analyzes
the data and returns a classification with a confidence score.




## OpenAPI

````yaml post /api/v2/ai/review
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/review:
    post:
      tags:
        - Public Scan
      summary: Vulnerability Review
      description: >
        Sends vulnerability details and source code to the AI service, which
        analyzes

        the data and returns a classification with a confidence score.
      parameters:
        - name: org
          in: query
          required: true
          description: Organization ID
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                code:
                  type: string
                  description: >
                    A code snippet representing the vulnerable logic or affected
                    lines.
                  example: |
                    try {
                      const user = db.getUserById(req.query.id);
                      res.send(user);
                    } catch (err) {
                      res.status(500).send("Error");
                    }
                cwe_id:
                  type: string
                  description: CWE identifier, if applicable.
                  example: CWE-79
                cwe_name:
                  type: string
                  description: Optional name or title of the CWE.
                  example: Cross-Site Scripting
                line:
                  type: string
                  description: Line number(s) where the issue appears.
                  example: '105'
                file:
                  type: string
                  description: Name or path of the file containing the snippet.
                  example: userController.js
      responses:
        '200':
          description: Successful classification result from the AI model.
          content:
            application/json:
              schema:
                type: object
                properties:
                  class:
                    type: string
                    enum:
                      - TRUE_POSITIVE
                      - FALSE_POSITIVE
                      - UNVERIFIED
                    description: |
                      The AI-determined classification of the vulnerability.
                  confidence:
                    type: number
                    format: float
                    description: Confidence percentage (0–100) of the classification.
                example:
                  class: TRUE_POSITIVE
                  confidence: 95.12
        '400':
          description: Invalid request format
        '500':
          description: Internal server error or AI model not configured
        '502':
          description: Failed to reach external AI model
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-AX-KEY

````