> ## 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.

# CometAPI で LobeChat を使う

> このガイドでは、base URL、API key、model または provider オプションを設定して、LobeChat を CometAPI と連携する方法を説明します。

[Lobe-Chat](https://chat-preview.lobehub.com/) は、CometAPI を組み込みでサポートする高機能なオープンソースの AI チャットアプリケーションです。手動で URL を設定する必要はありません。

## 前提条件

* [Lobe-Chat](https://chat-preview.lobehub.com/)（クラウド版またはセルフホスト版）
* 有効な API key を持つ [CometAPI](https://www.cometapi.com) アカウント

## セットアップ

<Steps>
  <Step title="CometAPI の API key を取得する">
    [CometAPI ダッシュボード](https://www.cometapi.com/console)にログインします。**Add API Key** をクリックして、key をコピーします。

    <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="CometAPI ダッシュボード — 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="CometAPI の API key とベース URL" width="2434" height="1232" data-path="images/overview/810968_364193.png" />
    </Frame>
  </Step>

  <Step title="モデルプロバイダーとして CometAPI を選択する">
    Lobe-Chat で、アバター → **Application Settings** → **Model Providers** をクリックします。**CometAPI** を選択し、API key を貼り付けて、プロバイダーをオンに切り替えます。次に、モデルを選択して有効化します。

    <Frame>
      <img src="https://mintcdn.com/cometapi/E4FFvyMYmaOZoldp/images/integrations/810968_360319.png?fit=max&auto=format&n=E4FFvyMYmaOZoldp&q=85&s=299c123baafc43c598449113a6723031" alt="Lobe-Chat のアプリケーション設定 — モデルプロバイダー一覧" 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="API key が入力された Lobe-Chat の CometAPI プロバイダー設定" width="1910" height="965" data-path="images/integrations/810968_361341.png" />
    </Frame>
  </Step>

  <Step title="接続をテストする">
    チャットを開始して、テストメッセージを送信します。正常にレスポンスが返れば、統合が正しく動作していることを確認できます。

    <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="CometAPI からの正常なレスポンスを表示している Lobe-Chat の会話" 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="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": "CometAPI で LobeChat を使う",
        "description": "このガイドでは、base URL、API key、model または provider オプションを設定して、LobeChat を CometAPI と連携する方法を説明します。",
        "step": [
          {
            "@type": "HowToStep",
            "@id": "https://apidoc.cometapi.com/integrations/lobe-chat#step-1",
            "position": 1,
            "name": "CometAPI の API key を取得する",
            "text": "CometAPI アカウントを作成または開き、ダッシュボードから有効な API key をコピーします。"
          },
          {
            "@type": "HowToStep",
            "@id": "https://apidoc.cometapi.com/integrations/lobe-chat#step-2",
            "position": 2,
            "name": "モデルプロバイダーとして CometAPI を選択する",
            "text": "「CometAPI で LobeChat を使う」ガイドの「モデルプロバイダーとして CometAPI を選択する」手順を完了します。"
          },
          {
            "@type": "HowToStep",
            "@id": "https://apidoc.cometapi.com/integrations/lobe-chat#step-3",
            "position": 3,
            "name": "接続をテストする",
            "text": "CometAPI Models ページから現在の model ID を選択し、その後統合からテストリクエストを送信します。"
          }
        ]
      },
      {
        "@type": "BreadcrumbList",
        "itemListElement": [
          {
            "@type": "ListItem",
            "position": 1,
            "name": "CometAPI ドキュメント",
            "item": "https://apidoc.cometapi.com/"
          },
          {
            "@type": "ListItem",
            "position": 2,
            "name": "連携",
            "item": "https://apidoc.cometapi.com/integrations"
          },
          {
            "@type": "ListItem",
            "position": 3,
            "name": "CometAPI で LobeChat を使う",
            "item": "https://apidoc.cometapi.com/integrations/lobe-chat"
          }
        ]
      }
    ]
    }
    `}
</script>
