ai-hub
ai-assistants

Query AI Assistant by ID

Forwards a message from a user to a specific AI assistant identified by its unique ID and returns the assistant's response.<br/><br/>This endpoint performs a semantic search over an AI assistant's indexed documents based on configured guidelines. It then generates a response using the LLM connected to the assistant.<br/><br/>The "use shared history" feature allowing an AI assistant to utilize the agent's conversation history, is only available if used together with Infobip AI agents.

post/ai/1/aiassistants/{assistantId}/query

Request

  • Base URL
    https://api.infobip.com (the document declares no server; this is the origin it was published from)
  • Auth
    • OAuth 2
      Client credentials
      Token URL: https://api.infobip.com/auth/1/oauth2/token
    • or API key in header Authorization
    • or API key in header Authorization
    • or HTTP basic

Path parameters

assistantIdstring required

Unique identifier of the AI assistant to query.

Request body

messagestring required

User message an AI assistant receives.

useSharedHistoryboolean

Indicates whether to use shared conversation history. Can only be used with Infobip AI agents.

sessionIdstring

Session ID to maintain context across multiple queries.

returnContextsboolean

Flag to indicate whether to return the contexts used in generating the response.

Example request

{
  "message": "Hello, what can you help me with?",
  "sessionId": "session-12345"
}

Response

AI Assistant response retrieved successfully

responsestring required

Ai Assistant answer.

Changes

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