---
title: "Create Key"
method: POST
path: "/api/v1/keys"
tags: ["api-keys-browser", "API Keys"]
---

# Create Key

`POST /api/v1/keys`

## Request

- Base URL: `https://kyt.infinihash.com`
- URL: `https://kyt.infinihash.com/api/v1/keys`
- Auth: API key in header `X-API-Key`

## Request body

- CreateKeyRequest
  - `name` string, required
  - `rate_limit_per_month` integer, nullable

## Response `201`

Successful Response

- CreateKeyResponse
  - `id` string, required
  - `name` string, nullable, required
  - `key_prefix` string, nullable, required
  - `created_at` string, date-time, required
  - `last_used_at` string, date-time, nullable, required
  - `revoked_at` string, date-time, nullable, required
  - `rate_limit_per_month` integer, nullable, required
  - `usage_this_month` integer, nullable
  - `remaining_this_month` integer, nullable
  - `raw_key` string, required

## Other responses

- `422`: Validation Error

---

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