> ## Documentation Index
> Fetch the complete documentation index at: https://modular-main.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# API keys

> Create and manage API keys to authenticate requests

API keys authenticate requests to model endpoints.

[Create API keys in the console →](https://console.modular.com/api_keys)

## Choose an API key type

You can create the following types of API keys:

* **Personal keys** are associated with individual users. You can view and copy
  the key value only during key creation.

* **Organization keys** are owned by a service account and are intended for
  automations. Anyone in the organization can view and copy the
  key value at any time.

## Create an API key

To create an API key:

1. Open the [API keys](https://console.modular.com/api_keys) page.

2. Next to **Personal keys** or **Organization keys**, click **+ Create**.

3. Enter the following information:

   * **Name**: Enter a short, descriptive name for the key.
   * **Description**: Optionally, describe how the key is used.
   * **Model access**: Leave this option enabled.
   * **Expires**: Select when the key expires. You can't use the key after this
     date.

4. Click **Submit**.

5. If you created a personal key, copy the API key and store it in a secure
   location. You can't access the value of a personal key after you close the
   dialog.

The API key has the following format:

```text theme={null}
sk-mod-<organization>-<random>
```

Store the key securely, such as in a secret manager.

<Note>
  You can't regenerate an API key. To replace a key while preserving its name,
  delete the existing key and create a new key with the same name.
</Note>
