> ## Documentation Index
> Fetch the complete documentation index at: https://magica-adi.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Chats

> Create, list, read, and delete conversations.

Chats belong to the user behind the API key. Another user's id is `404 CHAT_NOT_FOUND`.

## Create

`POST /api/v1/chats` returns `201`. This is optional. To send a first message in one call, use `POST /api/v1/completions` and omit `chatId`.

<ParamField body="title" type="string">
  Optional. 1–120 characters. Omitted titles get a default.
</ParamField>

```json theme={null}
{ "title": "Launch plan" }
```

<ResponseExample>
  ```json theme={null}
  {
    "id": "11111111-1111-4111-8111-111111111111",
    "title": "Launch plan",
    "isFavorite": false,
    "lastMessageAt": "2026-09-22T07:00:00.000Z",
    "lastMessageId": null,
    "createdAt": "2026-09-22T07:00:00.000Z",
    "updatedAt": "2026-09-22T07:00:00.000Z"
  }
  ```
</ResponseExample>

## List

`GET /api/v1/chats`

<ParamField query="limit" type="integer" default="20">
  Page size, 1–50.
</ParamField>

<ParamField query="cursor" type="string">
  Pass `nextCursor` from the previous page.
</ParamField>

<ParamField query="q" type="string">
  Title search.
</ParamField>

<ParamField query="favorite" type="string">
  `true` or `false`.
</ParamField>

```json theme={null}
{
  "items": [],
  "nextCursor": null
}
```

Newest first. `GET /api/v1/chats/{chatId}` returns one chat object.

## Delete

`DELETE /api/v1/chats/{chatId}` returns `204`. The row is soft-deleted. A repeat delete of someone else's chat is `404`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.