v1

latestOpenAPI 3.1.0raw.githubusercontent.com2026-06-25173140700.7 KB
Chat

Update a chat

Update settings of an existing chat (name, model, temperature, etc.).

patch/chats/{chat_id}

Path parameters

chat_idinteger required

Query parameters

cookie_namestring nullable

Request body

namestring nullable

Display name for the chat.

temperaturenumber nullable

Sampling temperature for the chat's LLM; higher is more creative.

similarity_top_kinteger nullable

Number of top similar document chunks to retrieve for context.

system_promptstring nullable

System prompt steering the assistant. Not allowed when an assistant is set.

modelstring nullable

Name of the LLM model to use. Not allowed when an assistant is set.

privateboolean nullable

Whether the chat is private to its creator.

Example request

{
  "name": "Q3 planning",
  "temperature": 0.7,
  "similarity_top_k": 5,
  "system_prompt": "You are a concise financial analyst.",
  "model": "gpt-4o"
}

Response

Successful Response

statestring nullable

Current lifecycle state of the record.

state_reasonstring nullable

Optional explanation for the current state.

state_changed_atstring date-time nullable

UTC timestamp when the state last changed.

idinteger nullable

Primary key for the chat.

created_atstring date-time

Timestamp when the chat was created.

updated_atstring date-time

Timestamp when the chat was last updated.

creator_user_idinteger required

ID of the user who created the chat.

project_idinteger nullable required

ID of the project the chat belongs to, if any.

namestring required

Name/title of the chat.

busyboolean required

DEPRECATED. Whether the chat is currently busy processing.

temperaturenumber nullable

Sampling temperature override for this chat.

similarity_top_kinteger nullable

Number of top similar documents to retrieve for this chat.

system_promptstring nullable

System prompt override for this chat.

llm_catalog_idinteger nullable

ID of the LLM catalog entry used by this chat.

llm_settings_idinteger nullable

ID of the LLM settings used by this chat.

assistant_idinteger nullable

ID of the assistant driving this chat, if any.

privateboolean

Whether the chat is private to its creator within the project.

consumed_tokensinteger nullable

Total number of tokens consumed by this chat.

form_dataobject nullable

Submitted form values for form-input assistants, keyed by field key.

Example response

{
  "state": "NEW",
  "state_reason": "Processing failed: timeout",
  "state_changed_at": "2026-01-16T08:00:00Z",
  "id": 1,
  "created_at": "2026-06-23T12:00:00Z",
  "updated_at": "2026-06-23T12:00:00Z",
  "creator_user_id": 1,
  "project_id": 1,
  "name": "Untitled chat",
  "temperature": 0.7,
  "similarity_top_k": 5,
  "system_prompt": "You are a helpful assistant.",
  "llm_catalog_id": 1,
  "llm_settings_id": 1,
  "assistant_id": 1,
  "consumed_tokens": 1024,
  "form_data": {
    "tone": "formal",
    "topic": "sales"
  }
}