---
title: "Mint a new API key for the authenticated user"
method: POST
path: "/v1/auth/keys/new"
tags: ["auth"]
---

# Mint a new API key for the authenticated user

`POST /v1/auth/keys/new`

## Request

- Base URL: `https://vdb.ai.kr` (the document declares no server; this is the origin it was published from)
- URL: `https://vdb.ai.kr/v1/auth/keys/new`
- Auth: none declared

Mint a new key. One active key per account — if the caller
already has a non-revoked key they must revoke it first.

Rationale: a single user issuing many keys 'in parallel' was a
foot-gun (operator-style abuse + rotation confusion). The product
decision is one credential at a time; rotation = revoke + reissue.
The 409 response carries the prefix of the existing key so the
UI can hint at which row to revoke.

## Request body

- NewKeyRequest
  - `name` string, nullable
  - `as_user_id` string, nullable

## Response `200`

Successful Response

- NewKeyResponse
  - `api_key` string, required
  - `api_key_prefix` string, required
  - `name` string, nullable, required
  - `message` string

## Other responses

- `422`: Validation Error

---

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