# Authentication

The Analytics API uses API key authentication through the `X-API-KEY` header. This authentication method provides secure access to analytics endpoints for users with paid subscription plans.

## Obtaining an API Key

* **Have a paid subscription** - API access is not available for free plan users
* Get or create your Analytics API key on [Definest API page](https://definest.ai/api)

## API Key usage

Include your API key in the header for all Analytics API requests: `X-API-KEY`

```
curl -H "X-API-KEY: your_api_key_here"
```

## Rate Limits

The limit is currently set at **60 requests per minute** and **5k requests per day**.

If you reach the limit, request will return a 429 status code with an error for every request beyond the limit before it will be reset.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.definest.ai/api/wallet-analytics/authentication.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
