Chat

Chat

Chat with your kapa.ai instance. Calling this endpoint creates a new Thread object in the database and returns the answer to the user's query. A Thread object is a collection of messages in a conversation between the user and the AI model. To ask follow-up questions, use the thread_id returned in the response and call the chat in thread endpoint.

post/query/v1/projects/{project_id}/chat/

Request

  • Base URL: https://api.kapa.ai
  • URL: https://api.kapa.ai/query/v1/projects/{project_id}/chat/
  • Auth: one of:
    • API key in cookie sessionid
    • HTTP bearer
    • API key in header X-API-KEY

Path parameters

project_idstring required

The ID of the project.

Request body

integration_idstring uuid

Optional integration id for the request. Use the ID of the integration that the user is interacting with. If not provided, the conversation may not be included in some statistics that group by integration.

customization_idstring uuid

Optional customization ID. Applies the specified customization to this request.

source_ids_includestring[]

Optional list of source IDs for filtering retrieval data.

source_group_ids_includestring[]

Optional list of source group IDs for filtering retrieval data.

querystring required

The query to ask Kapa.

Response

answerstring required

The answer generated by the model.

thread_idstring required

The thread ID of the thread created for the query. Use this ID to follow up with additional questions.

question_answer_idstring required

The ID of the generated question answer.

is_uncertainboolean required

Whether the model is uncertain about the answer.

Changes

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