# How to create an OpenAI connection

To use [AI Text generation in Channable](https://helpcenter.channable.com/manage-improve-product-data/optimize-attributes-with-ai/how-to-use-ai-generated-text), you need to connect your OpenAI account that will be responsible for the tokens you spend on AI text generation.

### <i class="fa-memo-circle-check">:memo-circle-check:</i> Before you start

**You'll need**

* Access to an OpenAI account
* A Core Pro Channable plan

**Good to know**

* You may need **access permissions** if you use a corporate account. Contact your company's IT Support (or the team that owns OpenAI API Platform access) to request the key or if you encounter an error when creating a project.
* [Token costs for OpenAI GPT-5.4 Nano ](https://developers.openai.com/api/docs/pricing)

{% stepper %}
{% step %}

### Step 1: Create an API key in OpenAI platform

1. Go to **OpenAI Platform** > **API Keys** and choose the account from which you can spend tokens. It can be a company’s, agency’s or a personal account.
2. Click **+ Create new secret key**.

<figure><img src="https://501928696-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fu8whzIfip72Kvn3M1bsc%2Fuploads%2Fhz5vVBS8DX0Zs6YpAA01%2Funknown.png?alt=media&#x26;token=c6a8c257-7fd0-487a-a6c8-dd23441e9026" alt=""><figcaption></figcaption></figure>

3. Fill in your Secret key details:
   1. For **Name**, give your key a descriptive name (e.g. 'OpenAI Channable').
   2. For **Project**, select the project you want to use.
   3. For **Permissions**, set to **All**.

<figure><img src="https://501928696-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fu8whzIfip72Kvn3M1bsc%2Fuploads%2FNrWhxGoN8eYPSTn7xm9I%2Funknown.png?alt=media&#x26;token=0855f201-8cda-4839-97c3-efefeaceb19b" alt=""><figcaption></figcaption></figure>

4. Click **Create secret key**.
5. A pop-up will appear with your new key information. Click <i class="fa-copy">:copy:</i> **Copy** to copy the key to your clipboard. Immediately make note of your key and put the information in a safe place, as you will need it in the next step.

<figure><img src="https://501928696-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fu8whzIfip72Kvn3M1bsc%2Fuploads%2F3k9v8V84NR7MC2zaUP33%2Funknown.png?alt=media&#x26;token=c6177fe1-edb4-453a-b97f-ec9ec45df003" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}
**Important:** For safety reasons, OpenAI only allows you to only copy the same secret key once. If you lose your secret key, you'll need to [create a new one](#step-1-create-an-api-key-in-openai-platform).&#x20;
{% endhint %}
{% endstep %}

{% step %}

### Set up billing <mark style="color:$info;">(if needed)</mark>

1. In the sidebar, go to **Billing**.

{% hint style="info" %}
**Note:** You may already have another tier if it is used for other tools in your organization. In this case, no additional action is needed.
{% endhint %}

<figure><img src="https://501928696-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fu8whzIfip72Kvn3M1bsc%2Fuploads%2F1WQBhiRNj9NZkBlpG444%2Funknown.png?alt=media&#x26;token=5d6106c3-9bb2-4d22-925c-2055a671cf81" alt=""><figcaption></figcaption></figure>

2. Click **Add payment details** and follow the instructions. This involves adding credits (minimum $5) that you'll use for tokens.&#x20;

{% hint style="warning" %}
**Important:** OpenAI billing works on a pre-paid model. Credits are bought upfront, giving you control over your spending. You can optionally turn on auto-recharge if preferred.
{% endhint %}

<details>

<summary><strong>How do I know how much I will end up spending?</strong></summary>

Spending on AI text generation depends on the amount of input data, prompt length, length of output data and a number of products in the list for generation.

An estimated cost based on average character limits is: \~€0.20 per 1000 titles; \~€0.70 per 1000 descriptions.&#x20;

The **Estimated generation cost** will be indicated in the prompting and finalizing steps of the feature you're using it with.

</details>
{% endstep %}

{% step %}

### Create an OpenAI connection in Channable

1. Go to **\[your company] > \[your project] > Optimize**.
2. Click **+ Generate text with AI** to start the setup.
3. In the pop up, select the type of content that you want to create. The content type you select defines the prompt template that you will work with in the Prompting step.

   * **Titles:** Generate AI text suggestions to improve product titles.
   * **Descriptions:** Generate AI text suggestions to improve product descriptions.
   * **Free text:** Generate AI text suggestions for specific text fields.

   <figure><img src="https://501928696-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fu8whzIfip72Kvn3M1bsc%2Fuploads%2F125uC9oGLf2tzYvblZOa%2Funknown.png?alt=media&#x26;token=3175e867-5607-4d82-ac99-8fd07a33d958" alt=""><figcaption></figcaption></figure>
4. Click **Continue**.
5. You will be directed to the **Settings** step to configure your generator. Fill in these details:
   1. At **Name**, add a descriptive name so it's easier to find your AI generated text set later.
   2. At **AI connection**, select **OpenAI** > **Connect**. A pop-up will appear.&#x20;
      1. For **Connection type**, click the dropdown and select **OpenAI**.
      2. For **Label**, give your connection a descriptive name (like 'OpenAI connection')
      3. For **API key**, paste the key you noted from Step 1.
      4. Click **Connect with OpenAI**.
6. Click **Save**.

Your connection will be logged and ready to use when you want to set up an AI text generator.&#x20;
{% endstep %}

{% step %}

### Continue setting up a generator

{% content-ref url="" %}
[](https://helpcenter.channable.com/manage-improve-product-data/optimize-attributes-with-ai/how-to-use-ai-generated-text)
{% endcontent-ref %}

{% endstep %}
{% endstepper %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://helpcenter.channable.com/manage-improve-product-data/optimize-attributes-with-ai/how-to-use-ai-generated-text/how-to-create-an-openai-connection.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
