> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.minikai.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.minikai.com/_mcp/server.

# Authentication

Every request to the Minikai API is authenticated with an API key, sent as a bearer token. A key is scoped to a single
workspace, so it can only read and write the records, Minis, labels and users in that workspace.

## Generate a key

In the Minikai app, open **Settings → Security** and create a key under **API Keys**. Copy it once and store it
securely, for example in a secret manager or an environment variable. The key is shown only at creation time.

## Send the key

Add the key to the `Authorization` header of every request:

```
Authorization: Bearer <your-api-key>
```

The host you send it to depends on your workspace's [data region](/guides/get-started/data-regions).

**`curl (Australia)`**

```bash title="curl (Australia)"
curl https://api.minikai.com/minikai-public/api/v1/Records \
  -H "Authorization: Bearer sk_live_..."
```

**`curl (United Kingdom)`**

```bash title="curl (United Kingdom)"
curl https://api.minikai.co.uk/minikai-public/api/v1/Records \
  -H "Authorization: Bearer sk_live_..."
```

**`Python (Australia)`**

```python title="Python (Australia)"
from minikai import Minikai
client = Minikai(token="YOUR_API_KEY")
```

**`Python (United Kingdom)`**

```python title="Python (United Kingdom)"
from minikai import Minikai
from minikai.environment import MinikaiEnvironment
client = Minikai(token="YOUR_API_KEY", environment=MinikaiEnvironment.UNITED_KINGDOM)
```

In Postman, open the request's **Authorization** tab, choose **Bearer Token**, and paste the key.

## Rotate a key

Rotate keys from the same **Security** screen. A deleted key stops working immediately, so generate the new key, deploy
it, then revoke the old one once nothing is using it.

> **Warning**
>
> Keep API keys out of source control and client-side code. A key carries full access to its workspace.