# API Authentication

## **Authentication - API Key**

* LENS API is a REST API that uses an HTTP client which requires an API key to use.
* API keys are issued for each search DB.
* The API Key contains the management authority for the search DB, so you need to be careful not to expose it to the outside.

## **How to use**

* Send the key in HTTP Request Header "x-api-key"&#x20;

**Example. x-api-key Header in cURL**

```javascript
curl --location --request POST '<ENDPOINT URL>' \
--header 'x-api-key: <API KEY>' \
--header 'Content-Type: application/json' \
--data-raw '<JSON BODY>'
```

**Example. x-api-key Header in Python**

```javascript
import requests
res = requests.post(
    '<ENDPOINT URL>', 
    json={
        # JSON BODY
    }, 
    headers={
        'x-api-key': '<API KEY>'
    }
)
```
