# Chats

> SDK methods for the Chats module, accessed via `soat.chats`. See the [Chats module docs](/docs/modules/chats) for permissions and data model, and each method's REST page for the full request/response schema.

# Chats

SDK methods for the Chats module, accessed via `soat.chats`. See the [Chats module docs](/docs/modules/chats) for permissions and data model, and each method's REST page for the full request/response schema.

### `soat.chats.createChat()`

Create a chat

- Method: `POST`
- Path: `/api/v1/chats`

```ts
await soat.chats.createChat({
  body: { /* + optional */ },
});
```

→ [Request & response schema](/docs/api/chats/create-chat)

### `soat.chats.listChats()`

List chats

- Method: `GET`
- Path: `/api/v1/chats`

```ts
await soat.chats.listChats({
  query: { /* + optional */ },
});
```

→ [Request & response schema](/docs/api/chats/list-chats)

### `soat.chats.getChat()`

Get a chat

- Method: `GET`
- Path: `/api/v1/chats/{chat_id}`

```ts
await soat.chats.getChat({
  path: { chat_id },
});
```

→ [Request & response schema](/docs/api/chats/get-chat)

### `soat.chats.deleteChat()`

Delete a chat

- Method: `DELETE`
- Path: `/api/v1/chats/{chat_id}`

```ts
await soat.chats.deleteChat({
  path: { chat_id },
});
```

→ [Request & response schema](/docs/api/chats/delete-chat)

### `soat.chats.createChatCompletion()`

Create a chat completion

- Method: `POST`
- Path: `/api/v1/chat/completions`

```ts
await soat.chats.createChatCompletion({
  body: { messages, /* + optional */ },
});
```

→ [Request & response schema](/docs/api/chats/create-chat-completion)
