> For the complete documentation index, see [llms.txt](https://docs.claid.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.claid.ai/authentication.md).

# Authentication

The Claid API uses API keys via **Bearer Auth** for API authentication with the following format: `Authorization: Bearer {YOUR_API_KEY}`.

To get your API key, [sign in to your Claid account](https://claid.ai/account/overview) and click ***Create API key*** button from the ***Overview*** or ***API keys*** pages.

![Create API key from the Claid dashboard](/files/Il1z4bPxEKsLcu0xfZgc)

Once API key is generated, you can either copy it or download it as a txt file.

{% hint style="info" %}
Make sure to save the API key in a safe place, as it has certain privileges and is only visible on the Claid dashboard once, at the time of creation.
{% endhint %}

### API key usage

Authentication to the API is performed via [Bearer Authentication](https://swagger.io/docs/specification/authentication/bearer-authentication/):

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

```http
GET {API_ENDPOINT} HTTP/1.1
Host: api.claid.ai
Authorization: Bearer {YOUR_API_KEY}
```

{% endtab %}

{% tab title="cURL" %}

```shell
curl -X GET --location "https://{API_ENDPOINT}" --http1.1 \
    -H "Host: api.claid.ai" \
    -H "Authorization: Bearer {YOUR_API_KEY}"
```

{% endtab %}
{% endtabs %}

### Permission scopes

Each API key can have permissions to perform [Storage](/storage-connectors/api-reference.md), [Image editing](/image-editing-api/api-reference.md) or both types of operations with **Admin** permission scope.

Scopes can be assigned to API key from the [Claid dashboard](https://claid.ai/account/api) at the creation time or later, via ***API keys*** → ***Edit key*** page.

{% hint style="info" %}
It’s always better to create API keys with minimal permissions scopes necessary for your use case.
{% endhint %}
