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

# API Keys

> Create and manage API keys for SDK and API access

The API Keys page lets you create and manage keys used to authenticate with the [Cloud SDK](/cognee-cloud/connections/cloud-sdk), the [REST API](/api-reference/introduction), and [agent connections](/cognee-cloud/connections/connecting-an-agent).

## Create a key

1. Click **Create API key**.
2. The key is generated and displayed. Copy it immediately — it is shown only once.

## Manage keys

The page lists all active keys with their creation date. To revoke a key, click the delete icon next to it. Revoked keys stop working immediately.

<Warning>
  Store API keys in environment variables or a secrets manager. Do not hardcode them in source files.
</Warning>

## Usage

Pass the API key in requests:

**Python SDK:**

```python theme={null}
import cognee

await cognee.serve(
    url="https://your-tenant.aws.cognee.ai",
    api_key="your-key"
)
```

**REST API:**

```bash theme={null}
curl -H "X-Api-Key: your-key" https://your-tenant.aws.cognee.ai/api/v1/datasets/
```

**Python SDK (serve mode):**

```python theme={null}
import cognee
await cognee.serve(url="https://your-tenant.aws.cognee.ai", api_key="your-key")
```

See [Cloud SDK](/cognee-cloud/connections/cloud-sdk) for the full setup guide.
