# 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="/files/oBxBiKWL4CnZjIh9nyk2" 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="/files/BIJnNI63zOcNYXsudIyJ" 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)
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.biodock.ai/public-api-beta/authentication.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
