> ## 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 NextChat with CometAPI

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

[NextChat](https://nextchat.club/) (formerly ChatGPT Next Web) is a one-click deployable AI chat app. Connect it to CometAPI using the OpenAI-compatible API settings.

## Prerequisites

* [NextChat](https://nextchat.club/) (web, desktop, or self-hosted)
* 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 API endpoint">
    Open NextChat **Settings** → **Custom Interface**. Select **OpenAI API**, enter `https://api.cometapi.com` in the **Interface Address** field, paste your key into **API Key**, and click **Save**.

    <Frame>
      <img src="https://mintcdn.com/cometapi/mA1ovj6s0e3RM42l/images/integrations/810968_351592.png?fit=max&auto=format&n=mA1ovj6s0e3RM42l&q=85&s=9e22a16aa7ddec68fcbbecb8ef28c2e6" alt="NextChat settings — custom interface and OpenAI API options" width="1919" height="930" data-path="images/integrations/810968_351592.png" />
    </Frame>
  </Step>

  <Step title="Test the connection">
    Send a test message. A successful reply confirms the integration is working.
  </Step>
</Steps>

<Tip>
  To add custom models, go to **Settings** → **Custom Model Names** and enter entries in this format:

  ```
  +your-model-id@OpenAI
  ```

  Format: `+` adds a model, the name before `@` is the model ID, and `@OpenAI` means it uses OpenAI format. Separate multiple entries with commas.
</Tip>
