# Auth

## Create API key <a href="#create-key" id="create-key"></a>

API keys can be issued by logging into the NFT Garden and going to the [API key](https://docs.nftgarden.app/en/webtools/api-key) menu.

## Authentication with API key <a href="#auth" id="auth"></a>

You can authenticate by assigning an API key to `x-api-key` in the header when making an API request.

{% hint style="info" %}
If no API key is specified, the request will automatically fail. Also, requests for functions that are not authorized when the API key is issued will also fail.
{% endhint %}

## Request example <a href="#request-sample" id="request-sample"></a>

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

```markup
curl -X POST -H "Content-Type: application/json" -H "x-api-key: <your-api-key>" -d '{"name": "NFT Garden", "description": "NFT Garden provides NFT backend"}'  https://api.nftgarden.app/api/v1/nft/
```

{% endtab %}
{% endtabs %}

{% hint style="warning" %}
The above command is an example of specifying an API key, so it will not work properly as is.
{% endhint %}
