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

# Connect ClickHouse with API Key – StackOne Hub

> Link a ClickHouse account in the StackOne Hub using API Key. End-user guide to authorize the integration and start using ClickHouse actions.

## Generating an API key

An API key belongs to one ClickHouse Cloud organization, and the roles you give it decide which actions can run.

**1. Create the API key**

Sign in to the [ClickHouse Cloud console](https://console.clickhouse.cloud), click your organization name at the bottom of the left sidebar, then select **API keys**.

<ul>
  <li>Click **New API key**.</li>
  <li>**API key name**: `StackOne Integration`</li>
  <li>**Roles**: **Admin**, so every action can run. A narrower role such as **Service Reader** limits the connection to what that role allows</li>
  <li>**Allow access to this API key from**: **Anywhere**</li>
  <li>Click **Generate API key**.</li>
</ul>

![The Create API key dialog with the API key name field and the Admin role highlighted](https://mintcdn.com/stackone-60/piSJzyZ9XF4GTLsG/connectors/clickhouse/images/custom-config-create-api-key.png?fit=max\&auto=format\&n=piSJzyZ9XF4GTLsG\&q=85\&s=bdb551b71618dc0374431da5b9b0979d)

**2. Copy the Key ID and Key Secret**

Copy the **Key ID** and **Key Secret** across.

<ul>
  <li>Click the copy icon beside each value.</li>
  <li>The **Key Secret** is only displayed once and cannot be retrieved later.</li>
</ul>

![The New API key generated panel with the copy buttons for Key ID and Key Secret highlighted](https://mintcdn.com/stackone-60/piSJzyZ9XF4GTLsG/connectors/clickhouse/images/custom-config-copy-credentials.png?fit=max\&auto=format\&n=piSJzyZ9XF4GTLsG\&q=85\&s=fd077aa4a7f64db41e542a2394e498f4)

## Link the Account

**1. Connect**

<ul>
  <li>Click **Connect**.</li>
  <li>If applicable, the provider will redirect you to a sign-in or authorization page. Complete the provider's authorization flow.</li>
  <li>Once authorization is successful, you will see a confirmation popup.</li>
</ul>

**2. Use Actions**

Connect an AI platform to the linked account's actions. See [AI Platforms](https://docs.stackone.com/ai-platforms/overview.md).

Other ways to call actions are listed in [Protocols & SDKs](https://docs.stackone.com/connect/protocols-and-sdks.md).


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