# Creating and revoking Textual API keys

{% hint style="info" %}
**Required global permission:** Create an API key
{% endhint %}

To be able to use the Textual SDK, you must have an API key.

Alternatively, you can use the Textual API to [obtain a JSON Web Token (JWT)](https://docs.tonic.ai/textual/tonic-textual-api/jwt-for-authentication) to use for authentication.

## Viewing the list of API keys <a href="#textual-api-keys-list" id="textual-api-keys-list"></a>

You manage keys from the **User API Keys** section of the **User Profile** page.

To display the **User Profile** page:

1. Click the user icon at the bottom of the navigation menu.
2. In the user menu, click **User Profile**.

<figure><img src="https://3072847115-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvOPn7KQptPWmS5iKg5P0%2Fuploads%2FkRQZiotE4SUDGZ06Gbv4%2FUserAPIKeys_List.png?alt=media&#x26;token=a906ce02-a188-4f39-8c06-04e9b296d01a" alt=""><figcaption><p>User API Keys list on the User Profile page</p></figcaption></figure>

## Creating a Textual API key

To create a Textual API key:

1. From the **User API Keys** section, click **Create New Key.**
2. In the **API Key Name** field, type a name to use to identify the key.

<figure><img src="https://3072847115-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvOPn7KQptPWmS5iKg5P0%2Fuploads%2FHjSFxp05qSvEu4OdQtHQ%2FUserAPIKeys_CreateKey.png?alt=media&#x26;token=19ff33cc-edce-452b-ae5b-1451668e5550" alt=""><figcaption><p>API key creation panel</p></figcaption></figure>

3. Click the save icon.

Textual adds the key to the list.

## Copying a Textual API key

To copy the text of an API key, so that you can use it in an SDK or API request, click its copy icon.

## Revoking a Textual API key

To revoke a Textual API key, in the **User API Keys** list, click the **Revoke** option for the key to revoke.

## Configuring the API key as an environment setting <a href="#textual-api-key-environment-setting" id="textual-api-key-environment-setting"></a>

You cannot instantiate the SDK client without an API key.

Instead of providing the key every time you call the Textual API, you can configure the API key as the value of the [environment variable](https://docs.tonic.ai/textual/textual-install-administer/configuring-textual/textual-env-var-configure) `TONIC_TEXTUAL_API_KEY`.&#x20;
