---
title: "Security Assistant"
method: POST
path: "/api/v2/ai/assistant"
tags: ["Public Scan"]
---

# Security Assistant

`POST /api/v2/ai/assistant`

## Request

- Base URL: `https://aquilax.ai`
- URL: `https://aquilax.ai/api/v2/ai/assistant`
- Auth: API key in header `X-AX-KEY`
- TypeScript: <https://skmtc.dev/aquilax-ai/apis/aquilax-ai-api-docs/docs/api/v2/ai/assistant/post.ts> (a function with typed inputs; its response is checked against the schema)

This API forwards the incoming question and vulnerability context to an external AI model assistant
and streams back the AI's response in real-time (text/event-stream).

## Query parameters

- `org` string, required

## Request body

- object
  - `code` string: A code snippet representing the vulnerable logic or affected lines.
  - `cwe_id` string: CWE identifier, if applicable.
  - `cwe_name` string: Optional name or title of the CWE.
  - `line` string: Line number(s) where the issue appears.
  - `file` string: Name or path of the file containing the snippet.
  - `prompt` string: A question to the Security Assistant
  - `status` string: TRUE POSITIVE, FALSE POSITIVE or UNVERIFIED
  - `Reason` string: Reason of how this is identified as vulnerability from the scanner
  - `Remedation` string: User parameters in the Query string

## Response `200`

Successful classification result from the AI model in streaming format.

- string

## Other responses

- `400`: Invalid request format
- `500`: Internal server error or AI model not configured
- `502`: Failed to reach external AI model

## Changes

- **2025-04-27** `24c2a675bded`: 1 breaking, 1 info
  - removed the media type `text/event-stream` for the response with the status `200`
  - added the media type `application/json` for the response with the status `200`
- **2025-04-27** `68cbcfda89aa`: 1 breaking, 1 info
  - removed the media type `application/json` for the response with the status `200`
  - added the media type `text/event-stream` for the response with the status `200`
- **2025-04-27** `d58535c8ac89`: 4 info
  - added the non-success response with the status `400`
  - added the non-success response with the status `500`
  - added the non-success response with the status `502`
  - added the success response with the status `200`
- **2025-04-27** `36f6514560a5`: 1 breaking, 3 info
  - removed the success response with the status `200`
  - removed the non-success response with the status `400`
  - removed the non-success response with the status `500`
  - removed the non-success response with the status `502`
- **2025-04-27** `3406661c8e53`: 1 info
  - added the media type `application/json` for the response with the status `200`

[Operation history](https://skmtc.dev/aquilax-ai/apis/aquilax-ai-api-docs/changes/api/v2/ai/assistant/post.md)

---

[API](https://skmtc.dev/aquilax-ai/apis/aquilax-ai-api-docs.md) - [All operations](https://skmtc.dev/aquilax-ai/apis/aquilax-ai-api-docs/llms.txt) - [OpenAPI document](https://skmtc.dev/aquilax-ai/apis/aquilax-ai-api-docs/revisions/9b4f595ad674?raw)
