---
title: "Create API key"
method: POST
path: "/v1/auth/keys"
tags: ["auth"]
---

# Create API key

`POST /v1/auth/keys`

## Request

- Base URL: `https://agentlair.dev`
- URL: `https://agentlair.dev/v1/auth/keys`
- Auth: none required

Create a new account and API key. No authentication required.
Rate limited to 5 key creations per IP per hour.
The returned `api_key` is shown **only once** — save it immediately.

## Request body

- object
  - `name` string: Optional label for the key
  - `email` string, email: Optional recovery email

## Response `201`

API key created

- ApiKey
  - `api_key` string: Full API key — save immediately, not shown again
  - `key_prefix` string
  - `account_id` string
  - `tier` 'free' | 'paid'
  - `created_at` string, date-time
  - `warning` string
  - `limits` object
    - `stacks` integer
    - `addresses` integer
    - `dns_records` integer
    - `emails_per_day` integer
    - `requests_per_day` integer

## Other responses

- `429`: Rate limited

---

[API](https://skmtc.dev/agentlair/apis/agentlair-api.md) · [All operations](https://skmtc.dev/agentlair/apis/agentlair-api/llms.txt) · [OpenAPI document](https://skmtc.dev/agentlair/apis/agentlair-api/revisions/fac95ff4995d?raw)
