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

# Sử dụng LobeChat với CometAPI

> Sử dụng hướng dẫn này để cấu hình LobeChat với CometAPI bằng cách thiết lập base URL, API key và các tùy chọn model hoặc nhà cung cấp.

[Lobe-Chat](https://chat-preview.lobehub.com/) là một ứng dụng chat AI mã nguồn mở giàu tính năng, có hỗ trợ tích hợp sẵn cho CometAPI — không cần cấu hình URL thủ công.

## Điều kiện tiên quyết

* [Lobe-Chat](https://chat-preview.lobehub.com/) (cloud hoặc tự lưu trữ)
* Một tài khoản [CometAPI](https://www.cometapi.com) với API key đang hoạt động

## Thiết lập

<Steps>
  <Step title="Lấy API key CometAPI của bạn">
    Đăng nhập vào [bảng điều khiển CometAPI](https://www.cometapi.com/console). Nhấp vào **Add API Key** và sao chép key của bạn.

    <Frame>
      <img src="https://mintcdn.com/cometapi/SZhlxZhCnMLn__BW/images/overview/810968_364191.png?fit=max&auto=format&n=SZhlxZhCnMLn__BW&q=85&s=aef81a83f29f8eb16655ed4060425f50" alt="Bảng điều khiển CometAPI — Add API Key" width="3824" height="1892" data-path="images/overview/810968_364191.png" />
    </Frame>

    <Frame>
      <img src="https://mintcdn.com/cometapi/HhtmQffktazbxUvS/images/overview/810968_364193.png?fit=max&auto=format&n=HhtmQffktazbxUvS&q=85&s=d893f659267150d0faf45f99eb5dffc1" alt="API key và base URL của CometAPI" width="2434" height="1232" data-path="images/overview/810968_364193.png" />
    </Frame>
  </Step>

  <Step title="Chọn CometAPI làm nhà cung cấp model">
    Trong Lobe-Chat, nhấp vào ảnh đại diện của bạn → **Application Settings** → **Model Providers**. Chọn **CometAPI**, dán API key của bạn và bật nhà cung cấp. Sau đó chọn một model để kích hoạt.

    <Frame>
      <img src="https://mintcdn.com/cometapi/E4FFvyMYmaOZoldp/images/integrations/810968_360319.png?fit=max&auto=format&n=E4FFvyMYmaOZoldp&q=85&s=299c123baafc43c598449113a6723031" alt="Cài đặt ứng dụng Lobe-Chat — danh sách nhà cung cấp model" width="1205" height="931" data-path="images/integrations/810968_360319.png" />
    </Frame>

    <Frame>
      <img src="https://mintcdn.com/cometapi/SZhlxZhCnMLn__BW/images/integrations/810968_361341.png?fit=max&auto=format&n=SZhlxZhCnMLn__BW&q=85&s=dc0b478e91393dcb3a5db92f07360ece" alt="Cài đặt nhà cung cấp CometAPI trong Lobe-Chat với API key đã được nhập" width="1910" height="965" data-path="images/integrations/810968_361341.png" />
    </Frame>
  </Step>

  <Step title="Kiểm tra kết nối">
    Bắt đầu một cuộc trò chuyện và gửi một tin nhắn thử nghiệm. Phản hồi thành công xác nhận rằng việc tích hợp đang hoạt động.

    <Frame>
      <img src="https://mintcdn.com/cometapi/SZhlxZhCnMLn__BW/images/integrations/810968_361342.png?fit=max&auto=format&n=SZhlxZhCnMLn__BW&q=85&s=5f804dee6dc6ac724164630e945a053d" alt="Cuộc trò chuyện trong Lobe-Chat hiển thị phản hồi thành công từ CometAPI" width="1900" height="960" data-path="images/integrations/810968_361342.png" />
    </Frame>

    <Frame>
      <img src="https://mintcdn.com/cometapi/SZhlxZhCnMLn__BW/images/integrations/810968_361343.png?fit=max&auto=format&n=SZhlxZhCnMLn__BW&q=85&s=3bdff04efc655f5235d11f34cb43b1b3" alt="Bảng phản hồi model của Lobe-Chat" width="1920" height="929" data-path="images/integrations/810968_361343.png" />
    </Frame>
  </Step>
</Steps>

<script type="application/ld+json">
  {`
    {
    "@context": "https://schema.org",
    "@graph": [
      {
        "@type": "HowTo",
        "@id": "https://apidoc.cometapi.com/integrations/lobe-chat#howto",
        "name": "Sử dụng LobeChat với CometAPI",
        "description": "Sử dụng hướng dẫn này để cấu hình LobeChat với CometAPI bằng cách thiết lập base URL, API key và các tùy chọn model hoặc nhà cung cấp.",
        "step": [
          {
            "@type": "HowToStep",
            "@id": "https://apidoc.cometapi.com/integrations/lobe-chat#step-1",
            "position": 1,
            "name": "Lấy API key CometAPI của bạn",
            "text": "Tạo hoặc mở tài khoản CometAPI của bạn, sau đó sao chép một API key đang hoạt động từ bảng điều khiển."
          },
          {
            "@type": "HowToStep",
            "@id": "https://apidoc.cometapi.com/integrations/lobe-chat#step-2",
            "position": 2,
            "name": "Chọn CometAPI làm nhà cung cấp model",
            "text": "Hoàn thành bước Chọn CometAPI làm nhà cung cấp model trong hướng dẫn Sử dụng LobeChat với CometAPI."
          },
          {
            "@type": "HowToStep",
            "@id": "https://apidoc.cometapi.com/integrations/lobe-chat#step-3",
            "position": 3,
            "name": "Kiểm tra kết nối",
            "text": "Chọn một model ID hiện tại từ trang CometAPI Models, sau đó gửi một yêu cầu thử nghiệm từ phần tích hợp."
          }
        ]
      },
      {
        "@type": "BreadcrumbList",
        "itemListElement": [
          {
            "@type": "ListItem",
            "position": 1,
            "name": "Tài liệu CometAPI",
            "item": "https://apidoc.cometapi.com/"
          },
          {
            "@type": "ListItem",
            "position": 2,
            "name": "Tích hợp",
            "item": "https://apidoc.cometapi.com/integrations"
          },
          {
            "@type": "ListItem",
            "position": 3,
            "name": "Sử dụng LobeChat với CometAPI",
            "item": "https://apidoc.cometapi.com/integrations/lobe-chat"
          }
        ]
      }
    ]
    }
    `}
</script>
