AI

Generate AI chat response

Generates an AI-powered response to user queries and requests.

post/api/{org_id}/ai/chat

Request

Path parameters

org_idstring required

Organization name

Request body

confirm_timeout_secsinteger nullable

Seconds the agent waits for a tool approval before denying it (capped at 600).

contextobject

Contextual information for the AI assistant. Should include:

  • start_time: Start of the time range in microseconds (required for search queries)
  • end_time: End of the time range in microseconds (required for search queries)
  • stream_name: Current stream being viewed (optional)
  • stream_type: Type of stream - logs, metrics, traces (optional)

The frontend should pass the user's currently selected time range and stream context to enable the AI assistant to search within the relevant data scope.

messagesobject[] required

Chat messages in the conversation.

modelstring

Optional model name override.

providerstring

Optional provider name override.

Response

Chat response

contentstring required
role'user' | 'assistant' | 'system' required

Changes

No recorded changes to this operation across all 1 revision of this API.