Skip to main content

Overview

The API gives you the highest degree of flexibility when deploying your kapa instances or performing analytics. You can leverage the API in various ways:

  • Integrate your kapa instances into systems for which no off-the-shelf integrations exist.
  • Get aggregate and time series usage statistics
  • Pull full conversation data into third party analytics systems instead of using the kapa platform.
  • Build your own analytics tools based on Common Questions and Source Analytics data.
  • Use kapa for purposes outside of question answering like creating content recommendations.

For detailed information check out the API Reference.

Capabilities

Chat

The kapa API offers multiple Chat endpoints for asking questions to your kapa instances. These endpoints power the Website Widget, Slack and Discord integrations so using these endpoints will let you replicate their behavior exactly.

When submitting a question to the Chat endpoints, kapa first performs retrieval over the data sources connected to your kapa instance and uses the search results to answer the question with an LLM.

There are seperate endpoints for starting a conversation and continuing a conversation in a Thread. After starting a conversation kapa will remember what you have asked before so you can simply ask follow-up questions without maintaining the conversation history yourself. These endpoints are available as both streamed and not streamed. The streamed endpoints are useful if you want to render their response as it is being generated. The user does not have to wait for the model to finish generating the whole answer but can start reading small chunks of it right away. The Website Widget uses the streamed endpoints.

Custom Chat

Next to the regular Chat endpoints kapa offers a lower-level Custom Chat endpoint. In contrast to the regular Chat endpoints it gives you full control over the prompting. The Custom Chat is useful if you want to build agents and tools that are different from technical question answering or you want to fundamentally change the style in which kapa is replying.

Like the regular chat endpoints kapa first performs retrieval over the data sources connected to your kapa instance and uses the search results in conjuntion with your prompting to generate a response.

Check out this tutorial to understand how to use the Custom Chat endpoint.

The kapa API offers a Search endpoint which powers the search interface of the Website Widget. This endpoint performs semantic search over the data sources connected to your kapa instance. This endpoint lets you find the most relevant sections from your knowledge sources based on a question.

Analytics

The kapa API offers multiple Analytics endpoints which power the analytics features of the kapa platform. All analytics information and data which can be accessed through the platform is available via API.