Chat

Custom chat

Deprecated: this endpoint will be removed on 2026-10-23.

In contrast to the standard chat API endpoints, the custom chat API grants the users full control over the prompting. The custom chat API has access to the same data sources as the regular chat endpoints. This enables users to develop applications with tailored behavior beyond the scope of standard Kapa functionality.

This endpoint is not streamed.

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

Request

  • Base URL: https://api.kapa.ai
  • URL: https://api.kapa.ai/query/v1/projects/{project_id}/chat/custom/
  • 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.

source_ids_includestring[]

Optional list of source IDs for filtering retrieval data.

retrieval_querystring

Optional query to use for retrieval instead of 'query' message

persist_answerboolean

Set to False to not save answer in kapa for analytics.

use_retrievalboolean

Set to False to perform a pure LLM generation without retrieval.

label_internal_sourcesboolean

Set to True to mark internal sources in context.

generation_model'gpt-4' | 'gpt-4-0613' | 'gpt-4o' | 'gpt-4o-2024-08-06' | 'gpt-4o-mini' | 'gpt-4o-mini-2024-07-18'
response_format'json_object'
redact_conversationboolean

Set to True to redact question and answer in analytics.

Response

answerstring required

The answer generated by the model.

thread_idstring uuid nullable required

The thread ID of the thread created for the question answer.

question_answer_idstring uuid nullable required

The ID of the generated question answer.

Changes

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