---
title: "Update a chat"
method: PATCH
path: "/chats/{chat_id}"
tags: ["Chat"]
---

# Update a chat

`PATCH /chats/{chat_id}`

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

## Path parameters

- `chat_id` integer, required

## Query parameters

- `cookie_name` string, nullable

## Request body

- ChatIn
  - `name` string, nullable — Display name for the chat.
  - `temperature` number, nullable — Sampling temperature for the chat's LLM; higher is more creative.
  - `similarity_top_k` integer, nullable — Number of top similar document chunks to retrieve for context.
  - `system_prompt` string, nullable — System prompt steering the assistant. Not allowed when an assistant is set.
  - `model` string, nullable — Name of the LLM model to use. Not allowed when an assistant is set.
  - `private` boolean, nullable — Whether the chat is private to its creator.

## Response `200`

Successful Response

- Chat
  - `state` string, nullable — Current lifecycle state of the record.
  - `state_reason` string, nullable — Optional explanation for the current state.
  - `state_changed_at` string, date-time, nullable — UTC timestamp when the state last changed.
  - `id` integer, nullable — Primary key for the chat.
  - `created_at` string, date-time — Timestamp when the chat was created.
  - `updated_at` string, date-time — Timestamp when the chat was last updated.
  - `creator_user_id` integer, required — ID of the user who created the chat.
  - `project_id` integer, nullable, required — ID of the project the chat belongs to, if any.
  - `name` string, required — Name/title of the chat.
  - `busy` boolean, required — DEPRECATED. Whether the chat is currently busy processing.
  - `temperature` number, nullable — Sampling temperature override for this chat.
  - `similarity_top_k` integer, nullable — Number of top similar documents to retrieve for this chat.
  - `system_prompt` string, nullable — System prompt override for this chat.
  - `llm_catalog_id` integer, nullable — ID of the LLM catalog entry used by this chat.
  - `llm_settings_id` integer, nullable — ID of the LLM settings used by this chat.
  - `assistant_id` integer, nullable — ID of the assistant driving this chat, if any.
  - `private` boolean — Whether the chat is private to its creator within the project.
  - `consumed_tokens` integer, nullable — Total number of tokens consumed by this chat.
  - `form_data` object, nullable — Submitted form values for form-input assistants, keyed by field key.

## Other responses

- `401` — Missing or invalid authentication.
- `403` — No access to this chat.
- `404` — No chat exists with the given id.
- `422` — Validation Error

---

[API](https://skmtc.net/neulandai/apis/neuland-ai-hub-api.md) · [All operations](https://skmtc.net/neulandai/apis/neuland-ai-hub-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/neulandai/neuland-ai-hub-api/versions/b53e89b98c2b/schema)
