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

# AnythingLLM を CometAPI で使う

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

[AnythingLLM](https://anythingllm.com/) はオールインワンの AI デスクトップアプリです。provider として **Generic OpenAI** を選択することで、CometAPI に接続して 500 以上の model にアクセスできます。

## 前提条件

* お使いのマシンに [AnythingLLM](https://anythingllm.com/) がインストールされていること
* 有効な API key を持つ [CometAPI](https://www.cometapi.com) アカウントがあること

## セットアップ

<Steps>
  <Step title="CometAPI API key を取得する">
    [CometAPI ダッシュボード](https://www.cometapi.com/console)にログインします。**Add API Key** をクリックし、キーとベース URL（`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="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="CometAPI API key とベース URL" width="2434" height="1232" data-path="images/overview/810968_364193.png" />
    </Frame>
  </Step>

  <Step title="LLM プロバイダーを設定する">
    AnythingLLM の **Settings** → **AI Providers** → **LLM Preferences** を開きます。モデルプロバイダーとして **Generic OpenAI** を選択し、**URL** フィールドに `https://api.cometapi.com/v1` を入力します。
  </Step>

  <Step title="API key と model を追加する">
    CometAPI キーを **API Key** フィールドに貼り付けます。選択したモデルに合わせて **Token Context Window** と **Max Tokens** を設定し、その後使用したい現在の model ID を入力します。

    <Frame>
      <img src="https://mintcdn.com/cometapi/E4FFvyMYmaOZoldp/images/integrations/810968_360336.png?fit=max&auto=format&n=E4FFvyMYmaOZoldp&q=85&s=499826a1508a3749bf0815fe3c7e03df" alt="Generic OpenAI が選択された AnythingLLM の LLM Preferences" width="2014" height="985" data-path="images/integrations/810968_360336.png" />
    </Frame>

    <Frame>
      <img src="https://mintcdn.com/cometapi/E4FFvyMYmaOZoldp/images/integrations/810968_360337.png?fit=max&auto=format&n=E4FFvyMYmaOZoldp&q=85&s=0e882f3675ff64c5c688e95b9629a2d9" alt="Base URL と API key フィールドが入力された状態" width="1905" height="1024" data-path="images/integrations/810968_360337.png" />
    </Frame>

    <Frame>
      <img src="https://mintcdn.com/cometapi/E4FFvyMYmaOZoldp/images/integrations/810968_360338.png?fit=max&auto=format&n=E4FFvyMYmaOZoldp&q=85&s=7c1f49711b3c429b74c9934f69caa7d9" alt="モデル名とトークン設定が構成された状態" width="1944" height="971" data-path="images/integrations/810968_360338.png" />
    </Frame>
  </Step>

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

    <Frame>
      <img src="https://mintcdn.com/cometapi/E4FFvyMYmaOZoldp/images/integrations/810968_360340.png?fit=max&auto=format&n=E4FFvyMYmaOZoldp&q=85&s=8d084b71b4df10e71d4ae9c40baf7766" alt="正常なレスポンスが表示された AnythingLLM チャット" width="915" height="740" data-path="images/integrations/810968_360340.png" />
    </Frame>
  </Step>
</Steps>

<Tip>
  同じ設定ページに複数のモデル名を追加できます。サポートされている識別子については、[CometAPI model list](/ja/overview/models)を確認してください。
</Tip>

<script type="application/ld+json">
  {`
    {
    "@context": "https://schema.org",
    "@graph": [
      {
        "@type": "HowTo",
        "@id": "https://apidoc.cometapi.com/integrations/anythingllm#howto",
        "name": "AnythingLLM を CometAPI と一緒に使う",
        "description": "このガイドでは、ベース URL、API key、model またはプロバイダーのオプションを設定して、AnythingLLM を CometAPI と連携する方法を説明します。",
        "step": [
          {
            "@type": "HowToStep",
            "@id": "https://apidoc.cometapi.com/integrations/anythingllm#step-1",
            "position": 1,
            "name": "CometAPI API key を取得する",
            "text": "CometAPI アカウントを作成または開き、ダッシュボードから有効な API key をコピーします。"
          },
          {
            "@type": "HowToStep",
            "@id": "https://apidoc.cometapi.com/integrations/anythingllm#step-2",
            "position": 2,
            "name": "LLM プロバイダーを設定する",
            "text": "「AnythingLLM を CometAPI と一緒に使う」ガイドの「LLM プロバイダーを設定する」手順を完了します。"
          },
          {
            "@type": "HowToStep",
            "@id": "https://apidoc.cometapi.com/integrations/anythingllm#step-3",
            "position": 3,
            "name": "API key と model を追加する",
            "text": "「AnythingLLM を CometAPI と一緒に使う」ガイドの「API key と model を追加する」手順を完了します。"
          },
          {
            "@type": "HowToStep",
            "@id": "https://apidoc.cometapi.com/integrations/anythingllm#step-4",
            "position": 4,
            "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": "AnythingLLM を CometAPI と一緒に使う",
            "item": "https://apidoc.cometapi.com/integrations/anythingllm"
          }
        ]
      }
    ]
    }
    `}
</script>
