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

# Authentication

API Authentication and Authorization.

Most requests to the chpter. APIs must be authenticated using **API keys.** This keys are Public Key and Secret Key which are associated to your chpter. account.

You can view and manage your API keys  in the chpter Dashboard .

Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.

{% hint style="info" %}
When making the API request use the Public Key in you request header.
{% endhint %}

Here is an example header to get you started.

````javascript
```javascript
  headers: { 
    'Content-Type': 'application/json', 
    'Api-Key': 'pk_*********************************'
  },
```
````

API requests without authentication will also fail. If you do not include your key when making an API request or use one that is incorrect, chpter. will return an error.

````json
```json
{
    "message": "unauthorized",
    "success": false,
    "status": 401
}
```
````
