> ## 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 Cline với CometAPI

> Sử dụng hướng dẫn này để cấu hình Cline 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 provider.

[Cline](https://marketplace.visualstudio.com/items?itemName=saoudrizwan.claude-dev) là một tiện ích mở rộng của VS Code mang trợ lý lập trình AI trực tiếp vào trình soạn thảo của bạn. Hãy cấu hình nó để sử dụng CometAPI như một provider tùy chỉnh tương thích với OpenAI.

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

* Đã cài đặt [Cline](https://marketplace.visualstudio.com/items?itemName=saoudrizwan.claude-dev) trong VS Code
* Một tài khoản [CometAPI](https://www.cometapi.com) có API key đang hoạt động

## Thiết lập

<Steps>
  <Step title="Cài đặt Cline trong VS Code">
    Tìm **Cline** trong bảng Extensions của VS Code và cài đặt nó.

    <Frame>
      <img src="https://mintcdn.com/cometapi/mA1ovj6s0e3RM42l/images/integrations/810968_351589.png?fit=max&auto=format&n=mA1ovj6s0e3RM42l&q=85&s=e7a42db3ea9dfa41a89ff14f23b75dc4" alt="Bảng Extensions của VS Code hiển thị tiện ích mở rộng Cline" width="1500" height="1000" data-path="images/integrations/810968_351589.png" />
    </Frame>
  </Step>

  <Step title="Lấy khóa API 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** rồi sao chép khóa của bạn và URL cơ sở (`https://api.cometapi.com`).

    <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="Khóa API CometAPI và URL cơ sở" width="2434" height="1232" data-path="images/overview/810968_364193.png" />
    </Frame>
  </Step>

  <Step title="Cấu hình nhà cung cấp API">
    Mở phần cài đặt Cline và chọn **OpenAI Compatible** làm nhà cung cấp. Nhập `https://api.cometapi.com/v1` vào trường **Base URL**, dán khóa của bạn vào **API Key**, rồi nhập model ID bạn muốn sử dụng.

    <Frame>
      <img src="https://mintcdn.com/cometapi/mA1ovj6s0e3RM42l/images/integrations/810968_351590.png?fit=max&auto=format&n=mA1ovj6s0e3RM42l&q=85&s=37db10e7d84ac7c4eac050d7021adae4" alt="Cài đặt Cline với OpenAI Compatible được chọn và URL cơ sở CometAPI đã được nhập" width="1500" height="1000" data-path="images/integrations/810968_351590.png" />
    </Frame>
  </Step>

  <Step title="Kiểm tra kết nối">
    Gửi một prompt thử nghiệm trong Cline (ví dụ: yêu cầu nó tạo một hàm hello world). Phản hồi thành công xác nhận rằng việc tích hợp đang hoạt động.
  </Step>
</Steps>

<script type="application/ld+json">
  {`
    {
    "@context": "https://schema.org",
    "@graph": [
      {
        "@type": "HowTo",
        "@id": "https://apidoc.cometapi.com/integrations/cline#howto",
        "name": "Sử dụng Cline với CometAPI",
        "description": "Sử dụng hướng dẫn này để cấu hình Cline với CometAPI bằng cách thiết lập URL cơ sở, 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/cline#step-1",
            "position": 1,
            "name": "Cài đặt Cline trong VS Code",
            "text": "Hoàn thành bước Cài đặt Cline trong VS Code trong hướng dẫn Sử dụng Cline với CometAPI."
          },
          {
            "@type": "HowToStep",
            "@id": "https://apidoc.cometapi.com/integrations/cline#step-2",
            "position": 2,
            "name": "Lấy khóa API 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/cline#step-3",
            "position": 3,
            "name": "Cấu hình nhà cung cấp API",
            "text": "Hoàn thành bước Cấu hình nhà cung cấp API trong hướng dẫn Sử dụng Cline với CometAPI."
          },
          {
            "@type": "HowToStep",
            "@id": "https://apidoc.cometapi.com/integrations/cline#step-4",
            "position": 4,
            "name": "Kiểm tra kết nối",
            "text": "Chọn một model ID hiện có từ trang Models của CometAPI, 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 Cline với CometAPI",
            "item": "https://apidoc.cometapi.com/integrations/cline"
          }
        ]
      }
    ]
    }
    `}
</script>
