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

# Chat Interface

> Comprehensive chat interface with multi-model support, conversation management, and advanced features

## Overview

The Open WebUI chat interface provides a powerful and intuitive environment for interacting with AI models. It supports multiple models simultaneously, persistent conversations, and rich media interactions.

## Core Chat Features

### Multi-Model Conversations

Engage with multiple AI models in parallel within a single chat session.

<Steps>
  <Step title="Select Models">
    Choose one or more models from the model selector in the chat interface
  </Step>

  <Step title="Send Your Message">
    Type your message and it will be sent to all selected models simultaneously
  </Step>

  <Step title="Compare Responses">
    View and compare responses from different models side-by-side
  </Step>
</Steps>

<Note>
  Multi-model conversations allow you to leverage the unique strengths of different models for optimal responses.
</Note>

### Conversation Management

Organize and manage your chat history effectively.

<Tabs>
  <Tab title="Chat List">
    Access all your conversations from the sidebar:

    * **Pinned Chats**: Keep important conversations at the top
    * **Recent Chats**: Browse by last updated time
    * **Archived Chats**: Move old conversations out of view
    * **Folder Organization**: Group related chats together
  </Tab>

  <Tab title="Search & Filter">
    Find conversations quickly:

    * **Text Search**: Search by chat title or content
    * **Tag Filtering**: Filter chats by custom tags using `tag:name`
    * **Pagination**: Navigate through large chat histories (60 chats per page)
  </Tab>

  <Tab title="Chat Actions">
    Manage individual conversations:

    * **Clone**: Create a copy of a conversation
    * **Share**: Generate a shareable link (requires permissions)
    * **Export**: Download chat statistics and content
    * **Archive**: Hide from main view without deleting
    * **Delete**: Permanently remove a conversation
  </Tab>
</Tabs>

### Chat Operations

#### Creating Chats

Start new conversations using the API or UI:

```python theme={null}
# API endpoint: POST /api/v1/chats/new
{
  "chat": {
    "title": "My Conversation",
    "history": {
      "messages": {},
      "currentId": null
    }
  }
}
```

#### Updating Messages

Edit messages in existing conversations:

```python theme={null}
# API endpoint: POST /api/v1/chats/{id}/messages/{message_id}
{
  "content": "Updated message content"
}
```

<Tip>
  Message updates trigger real-time events through WebSocket, keeping all connected clients synchronized.
</Tip>

### Tagging System

Organize conversations with custom tags.

<CardGroup cols={2}>
  <Card title="Add Tags" icon="tag">
    Apply tags to categorize your chats by topic, project, or any custom criteria.
  </Card>

  <Card title="Search by Tag" icon="filter">
    Use `tag:tagname` in the search box to filter conversations by specific tags.
  </Card>

  <Card title="Auto-Cleanup" icon="broom">
    Tags are automatically removed when no chats reference them, keeping your tag list clean.
  </Card>

  <Card title="Multiple Tags" icon="tags">
    Add multiple tags to a single chat for flexible organization.
  </Card>
</CardGroup>

## Markdown & LaTeX Support

Open WebUI supports full Markdown and LaTeX rendering for rich text formatting.

<Tabs>
  <Tab title="Markdown">
    Standard Markdown syntax is fully supported:

    * **Bold**, *italic*, and ~~strikethrough~~ text
    * Code blocks with syntax highlighting
    * Lists, tables, and blockquotes
    * Links and images
  </Tab>

  <Tab title="LaTeX">
    Mathematical expressions render beautifully:

    * Inline math: `$E = mc^2$`
    * Block equations: `$$\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}$$`
  </Tab>
</Tabs>

## Chat Statistics

Track detailed metrics about your conversations.

### Usage Analytics

View comprehensive statistics for each chat:

* **Message Count**: Total messages in current conversation path
* **History Message Count**: All messages including branches
* **Model Usage**: Breakdown of which models were used
* **Average Response Time**: How quickly models respond
* **Message Length**: Average content length for user and assistant messages

```json theme={null}
// Example stats response from routers/chats.py:179
{
  "id": "chat-id",
  "models": {"gpt-4": 5, "claude-2": 3},
  "message_count": 16,
  "history_message_count": 24,
  "average_response_time": 2.5,
  "average_user_message_content_length": 150,
  "average_assistant_message_content_length": 450
}
```

### Export Capabilities

<Steps>
  <Step title="Request Export">
    Navigate to Settings → Data Export or use the API endpoint:

    ```
    GET /api/v1/chats/stats/export?stream=true
    ```
  </Step>

  <Step title="Choose Format">
    * **Paginated JSON**: Standard API response with pagination
    * **Streaming JSONL**: Line-delimited JSON stream for large datasets
  </Step>

  <Step title="Filter by Date">
    Add `updated_at` parameter to export only recent chats:

    ```
    GET /api/v1/chats/stats/export?updated_at=1609459200
    ```
  </Step>
</Steps>

<Warning>
  Export features require the `ENABLE_COMMUNITY_SHARING` setting or admin role.
</Warning>

## Advanced Features

### Message Rating & Feedback

Provide feedback on model responses:

* **Rating System**: Rate messages with thumbs up/down
* **Custom Tags**: Add tags to annotate message quality
* **Analytics**: Track which models produce better responses

### Conversation Branching

Explore different conversation paths:

* **Clone at Message**: Create a new chat branching from any message
* **Original Chat Reference**: Cloned chats retain reference to source
* **Branch Point Tracking**: Know exactly where conversations diverged

### Folder Organization

Group related chats in folders:

```python theme={null}
# API endpoint: POST /api/v1/chats/{id}/folder
{
  "folder_id": "project-alpha"
}
```

<Tip>
  Folders support hierarchical organization - retrieve all chats in a folder including subfolders automatically.
</Tip>

## Real-time Features

### WebSocket Events

Stay synchronized with live updates:

* **Message Updates**: Real-time message edits across sessions
* **Typing Indicators**: See when models are generating responses
* **Multi-device Sync**: Changes propagate instantly to all your devices

### Collaborative Features

* **Shared Chats**: Generate shareable links for conversations
* **Clone Shared Chats**: Import interesting conversations shared by others
* **Public/Private Control**: Manage sharing permissions per chat

## Performance Features

### Pagination

Chats are loaded efficiently with:

* **60 chats per page** in list views
* **Lazy loading** for smooth scrolling
* **Skip/limit parameters** for API access

### Caching

Optimized for performance:

* Chat lists cached for quick access
* Incremental updates reduce server load
* Smart invalidation on changes

## API Reference

<CardGroup cols={2}>
  <Card title="List Chats" icon="list">
    ```
    GET /api/v1/chats/list?page=1
    ```

    Retrieve your chat history with pagination.
  </Card>

  <Card title="Create Chat" icon="plus">
    ```
    POST /api/v1/chats/new
    ```

    Start a new conversation.
  </Card>

  <Card title="Update Chat" icon="pen">
    ```
    POST /api/v1/chats/{id}
    ```

    Modify chat content or metadata.
  </Card>

  <Card title="Delete Chat" icon="trash">
    ```
    DELETE /api/v1/chats/{id}
    ```

    Remove a conversation permanently.
  </Card>
</CardGroup>

<Note>
  All API endpoints require authentication. See [User Authentication](/features/user-authentication) for details.
</Note>
