> ## 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 avante.nvim with CometAPI

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

[avante.nvim](https://github.com/yetone/avante.nvim) is a Neovim plugin that brings AI coding assistance into your editor. Configure it to use CometAPI as the backend to access GPT, Claude, and other models.

## Prerequisites

* [avante.nvim](https://github.com/yetone/avante.nvim) installed in Neovim
* 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="Edit your avante.nvim configuration">
    Open your Neovim config file and set the API endpoint to `https://api.cometapi.com/v1`. Paste your CometAPI key into the `openai` key field.

    <Frame>
      <img src="https://mintcdn.com/cometapi/mA1ovj6s0e3RM42l/images/integrations/810968_351623.png?fit=max&auto=format&n=mA1ovj6s0e3RM42l&q=85&s=160170230bf813b8887bbb94ffaeafc9" alt="avante.nvim configuration file with CometAPI base URL and API key" width="942" height="305" data-path="images/integrations/810968_351623.png" />
    </Frame>
  </Step>

  <Step title="Reload and test">
    Reload Neovim and trigger avante.nvim. A successful response confirms the setup is working.
  </Step>
</Steps>

<script type="application/ld+json">
  {`
    {
    "@context": "https://schema.org",
    "@graph": [
      {
        "@type": "HowTo",
        "@id": "https://apidoc.cometapi.com/integrations/avante-nvim#howto",
        "name": "Use avante.nvim with CometAPI",
        "description": "Use this guide to configure avante.nvim with CometAPI by setting the base URL, API key, and model or provider options.",
        "step": [
          {
            "@type": "HowToStep",
            "@id": "https://apidoc.cometapi.com/integrations/avante-nvim#step-1",
            "position": 1,
            "name": "Get your CometAPI API key",
            "text": "Create or open your CometAPI account, then copy an active API key from the dashboard."
          },
          {
            "@type": "HowToStep",
            "@id": "https://apidoc.cometapi.com/integrations/avante-nvim#step-2",
            "position": 2,
            "name": "Edit your avante.nvim configuration",
            "text": "Complete the Edit your avante.nvim configuration step in the Use avante.nvim with CometAPI guide."
          },
          {
            "@type": "HowToStep",
            "@id": "https://apidoc.cometapi.com/integrations/avante-nvim#step-3",
            "position": 3,
            "name": "Reload and test",
            "text": "Complete the Reload and test step in the Use avante.nvim with CometAPI guide."
          }
        ]
      },
      {
        "@type": "BreadcrumbList",
        "itemListElement": [
          {
            "@type": "ListItem",
            "position": 1,
            "name": "CometAPI Docs",
            "item": "https://apidoc.cometapi.com/"
          },
          {
            "@type": "ListItem",
            "position": 2,
            "name": "Integrations",
            "item": "https://apidoc.cometapi.com/integrations"
          },
          {
            "@type": "ListItem",
            "position": 3,
            "name": "Use avante.nvim with CometAPI",
            "item": "https://apidoc.cometapi.com/integrations/avante-nvim"
          }
        ]
      }
    ]
    }
    `}
</script>
