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

# Authentication

> All Messari API endpoints require an API key for authentication.

### Generating an API Key

![Messari API Key Generation Interface](https://mintcdn.com/messari-f8af6bf9/S-QldOK-JbnUNLbC/images/api-key.png?fit=max\&auto=format\&n=S-QldOK-JbnUNLbC\&q=85\&s=3dae55c2989ba7eb964663cffe9d475d)

### Access the API Dashboard

Navigate to the [API Access page](https://messari.io/account/api) in your Messari account.

Your API Key will be visible at the top of the page.

## Using the API Key

The API key must be included in the request headers using the `x-messari-api-key` header field:

```json theme={null}
{
  "headers": {
    "x-messari-api-key": "YOUR_API_KEY_HERE"
  }
}
```

## Permissions

API access is tiered based on your subscription level. By default, all users have access to the [Assets & Market Data](https://docs.messari.io/api-reference/endpoints/metrics/metrics-api.md) and [Exchanges](https://docs.messari.io/api-reference/endpoints/exchanges/exchanges-api.md) API endpoints.

For access to additional endpoints and services such as Fundraising, Intel, News & Topics, and more, please contact [sales@messari.io](mailto:sales@messari.io).

### Example Request (cURL)

The following example demonstrates how to send a request to the Messari API using cURL with the `x-messari-api-key` header:

```bash theme={null}
curl --location 'https://api.messari.io/ai/v1/chat/completions' \
--header 'x-messari-api-key: YOUR_API_KEY_HERE' \
--header 'Content-Type: application/json' \
--data '{
    "messages": [
        {
            "role": "user",
            "content": "Briefly explain what the Hyperliquid HyperEVM is"
        }
    ],
    "verbosity": "succinct",
    "response_format": "markdown"
}'
```

## Security Best Practices

> [card] Secure Storage
>
> Never share your API key publicly or commit it to version control

> [card] Environment Variables
>
> Store API keys in environment variables rather than hardcoding them

> [card] Regular Rotation
>
> Periodically update your API key for security purposes


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