> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hexgrid.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Add CivitAI API key to your account

> Create a CivitAI API key and save it in HexGrid Cloud so your compute instances can download the models your account can access.

Save a CivitAI API key in HexGrid Cloud so your compute instances can download models from CivitAI that your account is authorized to use.

## How the key works

A CivitAI API key is a credential that lets applications authenticate with CivitAI on your behalf. HexGrid Cloud stores it under **Third Party Tokens** and uses it whenever your instances download a model from CivitAI.

Grant the key only the permissions you need. HexGrid Cloud uses it to download models.

> [!NOTE]
>
> The key only carries your account's existing permissions. Make sure your CivitAI account can access a model before you try to download it.

> [!WARNING]
>
> Treat your CivitAI API key like a password. You are responsible for everything done with the key, including actions taken by automated agents or scripts, which count as your own actions under CivitAI's Terms of Service.

## Before you begin

You need:

* A [CivitAI](https://civitai.com/) account.
* A [HexGrid Cloud](https://hexgrid.cloud/) account.
* Access to the models you plan to download.

## Create a CivitAI API key

**1. Sign in to CivitAI**

Go to [CivitAI](https://civitai.com/) and sign in. If you do not have an account, create one and complete the setup.

![Screenshot From 2026 10 22 16 26 21](https://mintlify.s3.us-west-1.amazonaws.com/hex-grid-cloud/images/Screenshot-from-2026-10-22-16-26-21.png)

**2. Open Security & Apps**

Click your **profile icon** (top right) and open **Account Settings**. In the left sidebar, select **Security & Apps**.

![Screenshot From 2026 10 22 16 47 21](https://mintlify.s3.us-west-1.amazonaws.com/hex-grid-cloud/images/Screenshot-from-2026-10-22-16-47-21.png)

**3. Start a new API key**

In the **API keys** section, click **Add API key**. The key configuration dialog opens.

![Image](https://mintlify.s3.us-west-1.amazonaws.com/hex-grid-cloud/images/image-21.png)

**4. Name the key**

Enter a **Name** that identifies the key's purpose, such as `hexgrid-cloud-token`.

A dedicated key lets you revoke HexGrid Cloud's access later without affecting your other applications.

![Image](https://mintlify.s3.us-west-1.amazonaws.com/hex-grid-cloud/images/image-22.png)

**5. Choose permissions**

Choose a **Permission preset** and review the **Permissions** table (Read, Write, and Delete for each resource).

> [!WARNING]
>
> The **Permission preset** may default to **Full Access**. Select only the minimum permissions your use case requires.

**6. Save and copy the key**

Click **Save**. CivitAI displays your new API key.

> [!WARNING]
>
> CivitAI shows the full key only once. Copy it now and store it somewhere secure. Never put it in screenshots, source code, or Git commits.

Your new key then appears in the **API keys** section, along with its access level, creation date, and last-used status.

![Image](https://mintlify.s3.us-west-1.amazonaws.com/hex-grid-cloud/images/image-23.png)

## Add the key to HexGrid Cloud

**1. Open Third Party Tokens**

Sign in to [HexGrid Cloud](https://hexgrid.cloud/). In the left sidebar, go to **Compute → Access Keys**, then select the **Third Party Tokens** tab.

Find the **CivitAI Token** card. You can ignore the HuggingFace Token card.

![Third Party Tokens tab with the CivitAI Token card](https://mintcdn.com/hex-grid-cloud/iAybWHkn1AHz305P/images/Screenshot-from-2026-10-16-08-36-39.png?fit=max\&auto=format\&n=iAybWHkn1AHz305P\&q=85\&s=07d16a3104102aee96cc3cede1b81b9f)

**2. Paste and save the key**

1. Paste your key into the **Paste your read-only CivitAI token** field on the **CivitAI Token** card.
2. Click **Add Token** once it becomes enabled.
3. Wait for HexGrid Cloud to save the key.

> [!TIP]
>
> Paste the complete key with no leading or trailing spaces. A missing character makes the key invalid.

![API key pasted into the CivitAI Token field](https://mintcdn.com/hex-grid-cloud/iAybWHkn1AHz305P/images/image-18.png?fit=max\&auto=format\&n=iAybWHkn1AHz305P\&q=85\&s=f06b63c13699c6193998668e564dc9b1)

**3. Confirm the key was saved**

The card now shows your key in masked form with the date and time it was added. HexGrid Cloud never displays the full key again.

![Saved key shown in masked form with the date added](https://mintcdn.com/hex-grid-cloud/iAybWHkn1AHz305P/images/image-19.png?fit=max\&auto=format\&n=iAybWHkn1AHz305P\&q=85\&s=6cb7ed8d3a5d182c907ca9f24d899012)

Your instances now use this key automatically when they download models from CivitAI.

## Troubleshoot model downloads

A saved key confirms that HexGrid Cloud has the credential, not that every download will succeed. If a model fails to download, check that:

* The key appears on the **CivitAI Token** card.
* The key has the permissions the download needs.
* The key has not been deleted in CivitAI.
* Your CivitAI account can access the model you requested.

## Replace the key

Replace the saved key if it stops working, is exposed, or you create a new one.

1. Go to **Compute → Access Keys → Third Party Tokens**.
2. On the **CivitAI Token** card, click **Replace token**.
3. Paste your new CivitAI API key.
4. Click **Replace** to save it, or **Cancel** to keep the existing key.

![Replace token form for the CivitAI key](https://mintcdn.com/hex-grid-cloud/iAybWHkn1AHz305P/images/image-20.png?fit=max\&auto=format\&n=iAybWHkn1AHz305P\&q=85\&s=2f80a3d1b90874b7962f54185560214f)

> [!WARNING]
>
> If you think a key has been exposed, delete it in CivitAI under **Account Settings → Security & Apps → API keys** first, then replace it in HexGrid Cloud with a new one.

## Security best practices

* **Grant minimum permissions.** Select only the permissions your use case requires instead of **Full Access**.
* **Keep the key private.** Do not post it in chats, issue trackers, screenshots, or documentation.
* **Keep keys out of code.** Never hardcode a key or commit it to a repository.
* **Use one key per application.** You can then revoke a single integration without disrupting others.
* **Delete exposed keys immediately** and replace them with new ones.

## Quick reference

<table>
  <colgroup>
    <col width="132" />

    <col width="529" />
  </colgroup>

  <thead>
    <tr>
      <th>Where</th>
      <th>Path</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>CivitAI</td>
      <td>**Profile icon → Account Settings → Security & Apps → Add API key → Name → Permissions → Save → Copy**</td>
    </tr>

    <tr>
      <td>HexGrid Cloud</td>
      <td>**Compute → Access Keys → Third Party Tokens → CivitAI Token → Add Token**</td>
    </tr>
  </tbody>
</table>

## Useful links

> **[CivitAI](https://civitai.com/)**
>
> Sign in or create an account

> **[CivitAI API Keys](https://civitai.com/user/account)**
>
> Create and manage API keys

> **[HexGrid Cloud](https://hexgrid.cloud/)**
>
> Open HexGrid Cloud


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.