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

# API Authentication

In order to start using the Pyas API, you are required to create API keys.

To authenticate, you will need to pass your API key in the request headers as `x-api-key` .

Note: API Keys are app based. When generating API keys, you generate them for an app. whenever you use your API key, accounts you connect will be associated with the app that the API key belongs to.

## Generate API Keys

1. Login to your Pyas account.
2. Click on the Apps tab to open the Apps page.
3. Select the Pyas App that you want to generate API keys for. If you don't have any apps yet, click on the **+ New App** button to create a new one.
4. Click on the **Settings** tab.
5. Then, click on the **API Keys** tab

<figure><img src="/files/431l8bwSFTdpIN9E8Yoc" alt=""><figcaption></figcaption></figure>

6. Click on **Generate New API Key**
7. Add a name for your API key
8. Select an expiration for your API key
9. Select scopes
10. **Click Generate API Key**

<figure><img src="/files/6uKcUayebFqEI5vxXJmE" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/V5m7Im9fiwmIk1p3rUrl" alt=""><figcaption></figcaption></figure>

Your API Key is generated, and you can now use it to authenticate by passing it in the `x-api-key` request header.
