v1

latestOpenAPI 3.1.0Elastic 2.02026-07-179371211.2 KB
Assistant

Send Chat Message

Send a message to the AI assistant and receive a response. Supports both streaming (SSE) and non-streaming responses.

post/api/assistant/chat

Query parameters

entityTypestring

Type of entity associated with this session (e.g., 'alert_investigation')

entityIdstring

ID of the entity associated with this session (e.g., alert's soc_id)

Request body

msgstring
sessionIdstring

Response

AI assistant response messages

idstring

The unique identifier for the message. Not required.

rolestring

Indicates who authored the message. Either user or assistant.

stop_reasonstring

The reason the message was stopped.

stop_sequencestring

The sequence in which the message was stopped.

thoughtsstring

The plain text thoughts from the model's response

Example response

[
  {
    "id": "c3d44fb8-3bc2-46e2-a7d2-8a8983556d1a",
    "role": "user",
    "stop_reason": "user_request",
    "stop_sequence": "end_turn",
    "usage": {
      "credits": 1,
      "input_tokens": 5,
      "output_tokens": 10
    }
  }
]