> ## 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 Obsidian Text Generator with CometAPI

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

[Text Generator](https://text-gen.com/) is an Obsidian plugin for AI-assisted writing. Connect it to CometAPI using the OpenAI Chat settings to access any supported model.

## Prerequisites

* [Obsidian](https://obsidian.md/) with the Text Generator plugin installed — search for it in **Settings** → **Community Plugins**

  <Frame>
    <img src="https://mintcdn.com/cometapi/mA1ovj6s0e3RM42l/images/integrations/810968_351619.png?fit=max&auto=format&n=mA1ovj6s0e3RM42l&q=85&s=9af2d4efbd3b18ecec26c6e43a83f650" alt="Text Generator plugin in the Obsidian plugin marketplace" width="690" height="553" data-path="images/integrations/810968_351619.png" />
  </Frame>

* 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 connection">
    Open the Text Generator plugin settings. Select **OpenAI Chat** as the AI provider, enter `https://api.cometapi.com/v1` in the **API Address** field, and paste your CometAPI key into the **Key** field. Select a model and click **Save**.

    <Frame>
      <img src="https://mintcdn.com/cometapi/mA1ovj6s0e3RM42l/images/integrations/810968_351620.png?fit=max&auto=format&n=mA1ovj6s0e3RM42l&q=85&s=b8a4bc38eb8e1ba0da8cb30e3fe728e5" alt="Text Generator settings — OpenAI Chat selected with CometAPI URL and key" width="690" height="454" data-path="images/integrations/810968_351620.png" />
    </Frame>
  </Step>

  <Step title="Test the connection">
    Open Obsidian and trigger a text generation prompt. A successful response confirms the integration is working.
  </Step>
</Steps>
