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

# Get API Key

> Retrieve your current API key metadata.

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://api.adrelay.dev/v1/api-keys" \
    -H "X-API-Key: $ADRELAY_API_KEY"
  ```

  ```javascript Node.js theme={null}
  const response = await fetch("https://api.adrelay.dev/v1/api-keys", {
    headers: { "X-API-Key": process.env.ADRELAY_API_KEY },
  });

  const data = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://api.adrelay.dev/v1/api-keys",
      headers={"X-API-Key": "your-api-key-here"},
  )

  data = response.json()
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": "key_abc123",
    "prefix": "ar_live_****abc1",
    "created_at": "2026-03-01T12:00:00Z",
    "last_used_at": "2026-03-21T09:45:00Z"
  }
  ```

  ```json 401 theme={null}
  {
    "error": "Invalid or missing API key.",
    "code": "UNAUTHORIZED",
    "timestamp": 1711036800,
    "request_id": "req_abc123"
  }
  ```
</ResponseExample>

Returns metadata about your API key including a masked prefix and usage timestamps. The full key value is never returned after initial creation.
