> For the complete documentation index, see [llms.txt](https://docs.synthdata.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.synthdata.co/getting-started/authentication.md).

# Authentication

The Synth API uses API key authentication. All requests must include your API key in the `Authorization` header.

## Getting an API Key

{% stepper %}
{% step %}

### Login

Go to your [Synth Dashboard](https://dashboard.synthdata.co/)
{% endstep %}

{% step %}

### Choose a plan

Sign up for the Professional or Enterprise plan
{% endstep %}

{% step %}

### Generate key

Generate a new API Key
{% endstep %}
{% endstepper %}

## Using Your API Key

Include your API key in the `Authorization` header:

```
Authorization: Apikey YOUR_API_KEY
```

### Example

{% code title="curl" %}

```bash
curl "https://api.synthdata.co/insights/volatility?asset=BTC" \
  -H "Authorization: Apikey YOUR_API_KEY"
```

{% endcode %}

## Security

{% hint style="warning" %}

* Never commit keys to version control
* Use environment variables
* Rotate keys regularly
  {% endhint %}

{% code title="python" %}

```python
import os

api_key = os.environ.get("SYNTH_API_KEY")
headers = {"Authorization": f"Apikey {api_key}"}
```

{% endcode %}
