> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mitu.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Authentication

MituAI APIs use API keys to authenticate requests and associate them with your account.\
Each API key must be included in the `x-api-key` HTTP header of every request made to the API.

<Note>
  API keys are sensitive. Do not expose them in client-side code, browser-based
  applications, or public repositories.
</Note>

You can generate and manage your keys directly from your dashboard.

***

### Getting your API key

To create an API key for use in your application:

1. Visit [https://app.mitu.ai](https://app.mitu.ai)
2. Go to **Developer → API Keys**
3. Click **New API Key**
4. Enter a descriptive label for your key (e.g. `CRM Integration`, `Loan Payment Reminder `)
5. Click **Submit**
6. Copy the key immediately, as it will not be shown again

If you lose the key, simply revoke it and generate a new one.

***

### Making authenticated requests

To make requests to the API, include your API key in the `x-api-key` header of every API call.

Here’s a basic example using `curl`:

<CodeBlock language="bash">
  curl [https://api.mitu.ai/v1/agents](https://api.mitu.ai/v1/agents) \ -H "x-api-key: YOUR\_SECRET\_API\_KEY" \\
  -H "Content-Type: application/json"
</CodeBlock>

***

### Revoking & rotating API keys

You can revoke a key at any time from your dashboard:

* Navigate to **Developer → API Keys**
* Click **Revoke** next to the key
* Once revoked, any requests using that key will immediately return `403 Forbidden`

<Tip>
  For enhanced security, create separate keys for staging and production
  environments, and rotate them periodically.
</Tip>

***

### Best practices

* Use a different key for each environment (development, staging, production)
* Store your keys securely using environment variables or secret managers
* Monitor usage and revoke unused keys
* Do not embed API keys in frontend code or public repositories

***

You’re now ready to start integrating with the Mitu API securely.
