# Authentication

To authenticate with the public API, you must first [generate an API key](https://app.biodock.ai/settings/api). You can generate an API key by going to Settings -> API and pressing the Generate button.&#x20;

<figure><img src="https://3806122466-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk3DfNQKoMy1JXdaDLvpG%2Fuploads%2FjTfT8IT5DnDrFs2lsPYS%2Farrow_at_generate_2.png?alt=media&#x26;token=663ae029-740c-46fb-bc8d-897c839835b2" alt=""><figcaption></figcaption></figure>

**IMPORTANT:** Your API keys grant access to your data, so please keep them secure.

It is highly recommended you also turn on copyable ids. You can do this by ensuring the checkbox is enabled.

<figure><img src="https://3806122466-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk3DfNQKoMy1JXdaDLvpG%2Fuploads%2F9pzmM2d6CqdocTitB58P%2Farrow_at_copyable_ids_2.png?alt=media&#x26;token=88fb84a0-3130-4d69-a6b6-a93c5f260c75" alt=""><figcaption></figcaption></figure>

Once you have an API key, you can verify it is working using the following endpoint.

## Verify API key

<mark style="color:blue;">`GET`</mark> `https://app.biodock.ai/api/external/check`

#### Headers

| Name                                        | Type   | Description |
| ------------------------------------------- | ------ | ----------- |
| X-API-KEY<mark style="color:red;">\*</mark> | String | API key.    |

{% tabs %}
{% tab title="200: OK Request was processed successfully" %}

```javascript
{
    user: "auth0|1234567890",
    email: "michael@biodock.ai",
    messsage: "API key is valid."
}
```

{% endtab %}
{% endtabs %}

### Sample Usage

```python
import requests

API_KEY = "" # Replace with your api key
URL = "https://app.biodock.ai/api/external/check"

headers = {"X-API-KEY": API_KEY, "Content-Type": "application/json"}

response = requests.get(URL, headers=headers)
print(response.text)
```
