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

# Use AnythingLLM with CometAPI

> Use this guide to configure AnythingLLM with CometAPI by setting the base URL, API key, and model or provider options.

[AnythingLLM](https://anythingllm.com/) is an all-in-one AI desktop app. By selecting **Generic OpenAI** as the provider, you can connect it to CometAPI and access 500+ models.

## Prerequisites

* [AnythingLLM](https://anythingllm.com/) installed on your machine
* A [CometAPI](https://www.cometapi.com) account with an active API key

## Setup

<Steps>
  <Step title="Get your CometAPI API key">
    Log in to the [CometAPI dashboard](https://www.cometapi.com/console). Click **Add API Key** and copy your key and base 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 dashboard — 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 and base URL" width="2434" height="1232" data-path="images/overview/810968_364193.png" />
    </Frame>
  </Step>

  <Step title="Configure the LLM provider">
    Open AnythingLLM **Settings** → **AI Providers** → **LLM Preferences**. Select **Generic OpenAI** as the model provider and enter `https://api.cometapi.com/v1` in the **URL** field.
  </Step>

  <Step title="Add your API key and model">
    Paste your CometAPI key into the **API Key** field. Set **Token Context Window** and **Max Tokens** to match your chosen model, then enter the current model ID you want to use.

    <Frame>
      <img src="https://mintcdn.com/cometapi/E4FFvyMYmaOZoldp/images/integrations/810968_360336.png?fit=max&auto=format&n=E4FFvyMYmaOZoldp&q=85&s=499826a1508a3749bf0815fe3c7e03df" alt="AnythingLLM LLM Preferences with Generic OpenAI selected" 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 and API key fields filled in" 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="Model name and token settings configured" width="1944" height="971" data-path="images/integrations/810968_360338.png" />
    </Frame>
  </Step>

  <Step title="Test the connection">
    Open a workspace and send a test message. A successful reply confirms the integration is working.

    <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 chat showing a successful response" width="915" height="740" data-path="images/integrations/810968_360340.png" />
    </Frame>
  </Step>
</Steps>

<Tip>
  You can add multiple model names on the same configuration page. Check the [CometAPI model list](/overview/models) for supported identifiers.
</Tip>
