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

# Authentication

> Learn how to authenticate your API requests

## API Key Authentication

All API requests require authentication using a workspace API key.

### Obtaining an API Key

1. Navigate to **Settings** → **Workspaces** → **Your Workspace** → **API Keys** in your dashboard
2. Click **Create API Key**
3. Give your key a descriptive name
4. Copy and securely store your API key - it will only be shown once

<Warning>
  Keep your API key secret! Never expose it in client-side code or public repositories.
</Warning>

### Using Your Workspace API Key

Authenticate requests using either header:

| Header          | Format                    |
| --------------- | ------------------------- |
| `Authorization` | `Bearer wsk_your_api_key` |
| `X-API-Key`     | `wsk_your_api_key`        |

### API Key Format

```
wsk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
```

* **Prefix:** `wsk_` (Workspace Key)
* **Body:** 32 random alphanumeric characters

### Authentication Errors

| Status | Error                  |
| ------ | ---------------------- |
| `401`  | Missing API key        |
| `401`  | Invalid API key        |
| `401`  | API key is deactivated |

### Best Practices

* Store API keys in environment variables
* Use separate keys for development and production
* Rotate keys periodically
* Monitor API key usage in your dashboard
