# Setup

### Obtaining an API key

All accounts can request an API key by visiting the ["API Settings" section of your account](https://annolab.ai/settings/api-keys)&#x20;

![How to get to settings page from dashboard](https://2539662686-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MR10rNw-iCGaHMIJEII%2F-MRHAw8KFcOVNw1MAFBg%2F-MRHD5kDiJLuUx3Nfco1%2Fapi_settings_get_there.png?alt=media\&token=c024c831-c06c-45c6-81a2-d39607527d56)

On the api-key page you can generate a new key with READ, WRITE, or both privileges.&#x20;

![](https://2539662686-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MR10rNw-iCGaHMIJEII%2F-MRHAw8KFcOVNw1MAFBg%2F-MRHDnpdpPGrMZ6Grauu%2Fapi_settings_page_generate_new.png?alt=media\&token=6813c2e7-7aa4-4bb0-9a93-688f329bb4a7)

If you generate a new key, please remember to copy the key to a safe location. This will be your only opportunity to copy the key and if you lose it you will need to generate a new one.

### Sending an API Request

Anno Lab accepts generic http requests that can be made from any programming language. Throughout this documentation site we have provided code samples to see concrete usage in action. Authorization for the request must be included in the header, specifically in the `Authorization` section with the pattern shown below.&#x20;

For particular routes and depending on how you send the request, you also may need to manually set the `Content-Type` header to have the value `application/json`. Many packages will automatically set this header (such as python `requests` used throughout this tutorial when you pass data using the json argument).&#x20;

{% tabs %}
{% tab title="Python" %}

```python
import requests

ANNO_LAB_API_KEY = 'XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX'

project = {
  'name': 'New NER Project'
}

headers = {
  'Authorization': 'Api-Key '+ANNO_LAB_API_KEY,
}

url = 'https://api.annolab.ai/v1/project/create'

response = requests.post(url, headers=headers, json=project)

print(response.json())
```

{% endtab %}
{% endtabs %}
