---
title: "Create Key"
method: POST
path: "/api/v1/admin/api-keys/"
tags: ["admin-api-keys"]
---

# Create Key

`POST /api/v1/admin/api-keys/`

## Request

- Base URL: `https://api.slidemaster.tw` (the document declares no server; this is the origin it was published from)
- URL: `https://api.slidemaster.tw/api/v1/admin/api-keys/`
- Auth: none declared

建立 API Key（回傳明文，僅此一次）

## Headers

- `Authorization` string, nullable

## Request body

- ApiKeyCreateRequest
  - `name` string, required
  - `scopes` string[], nullable
  - `rate_limit_rpm` integer
  - `rate_limit_rpd` integer

## Response `201`

Successful Response

- ApiKeyCreateResponse
  - `id` string, required
  - `key` string, required
  - `key_prefix` string, required
  - `name` string, required

## Other responses

- `422`: Validation Error

---

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