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

# Authentication

> How to authenticate with the Direkt API.

All Direkt API endpoints use the `x-api-key` header for authentication.

```bash theme={null}
--header 'x-api-key: YOUR_API_KEY'
```

## Example

```bash theme={null}
curl --location 'https://godirekt.xyz/api/quote' \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{ ... }'
```

## Getting your API key

1. Sign in to the Direkt dashboard
2. Go to **Settings → API Keys**
3. Copy your key — it starts with `dp_`

<Warning>
  Never expose your API key in client-side code or public repositories. Always call Direkt from your backend.
</Warning>

## Error responses

| HTTP Code | Reason                          |
| --------- | ------------------------------- |
| `401`     | Missing or invalid API key      |
| `403`     | Key revoked or lacks permission |
