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

# Authentication

> Generate a Birdeye API key from the BDS Security tab and use it in the X-API-KEY header.

# Authentication

Birdeye APIs use API-key authentication.

## Get your API key

1. Sign in at [bds.birdeye.so](https://bds.birdeye.so)
2. Open the `Security` tab in the dashboard
3. Click `Generate key`
4. Copy the key and store it securely

## Send the key in request headers

Include your key in the `X-API-KEY` header on every request.

```bash theme={null}
curl --request GET \
  --url 'https://public-api.birdeye.so/defi/price?address=So11111111111111111111111111111111111111112' \
  --header 'X-API-KEY: YOUR_API_KEY' \
  --header 'x-chain: solana'
```

## JavaScript

```js theme={null}
const response = await fetch(
  "https://public-api.birdeye.so/defi/price?address=So11111111111111111111111111111111111111112",
  {
    headers: {
      "X-API-KEY": process.env.BIRDEYE_API_KEY,
      "x-chain": "solana",
    },
  }
);

const data = await response.json();
```

## Python

```python theme={null}
import os
import requests

response = requests.get(
    "https://public-api.birdeye.so/defi/price",
    params={"address": "So11111111111111111111111111111111111111112"},
    headers={
        "X-API-KEY": os.environ["BIRDEYE_API_KEY"],
        "x-chain": "solana",
    },
)

print(response.json())
```

## Notes

* Generate keys from the `Security` page in BDS.
* Rotate keys if they are exposed or shared accidentally.
* Use whitelist and blacklist controls in the dashboard for tighter production security.
* Some endpoints also require headers such as `x-chain` or `x-perp`.
