latestOpenAPI 3.1.0Apache License Version 2.02026-08-17498525913.3 KB

40169ccdec5c

ai-model-controller

Send request to AI chat model (sendChatRequest)

Submits a single prompt - made up of an optional system message and a required user message - to the specified AI chat model and returns either the generated answer or an error envelope.

Available for users with 'TENANT_ADMIN' authority.

post/api/ai/model/chat

Request body

systemMessagestring

A system-level instruction that frames the user's input, setting the persona, tone, and constraints for the generated response

Example request

{
  "systemMessage": "You are a helpful assistant. Only output valid JSON.",
  "userMessage": {
    "contents": [
      {
        "text": "What is the weather like in Kyiv today?"
      }
    ]
  }
}

Response

OK

OR

Example response

{
  "status": "FAILURE"
}