Create a model response

Base URL
https://{kibana_url}
  • POST /api/security_ai_assistant/chat/complete
  • POST /s/{space_id}/api/security_ai_assistant/chat/complete
Auth

Create a model response for the given chat conversation.

Path parameters

space_id string optional

An identifier for the space. If space_id is not provided in the URL, the default space is used. Refer to Spaces for more information.

Query parameters

content_references_disabled boolean · default: false

If true, the response will not include content references.

Request body

connectorId string required

Required connector identifier to route the request.

conversationId string · format: nonempty · min length: 1

A string that does not contain only whitespace characters.

isStream boolean

If true, the response will be streamed in chunks.

langSmithApiKey string

API key for LangSmith integration.

langSmithProject string

LangSmith project name for tracing.

messages object[] required

List of chat messages exchanged so far.

content string

The textual content of the message.

data object

ECS-style metadata attached to the message.

fields_to_anonymize string[]

List of field names within the data object that should be anonymized.

role enum required

The role associated with the message in the chat.

Values: system user assistant
model string

Model ID or name to use for the response.

persist boolean required

Whether to persist the chat and response to storage.

promptId string

Prompt template identifier.

responseLanguage string

ISO language code for the assistant's response.

Responses

Indicates a successful model response call.

application/octet-stream

Response Type: string · format: binary

Bad Request response.

application/json
error string

Error type.

message string

Human-readable error message.

statusCode number

HTTP status code.

Base URL
https://{kibana_url}