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

# Create API Key

`POST /api/me/api-keys`

Create a new API key. The full key is returned only at creation time — store it securely.

## Request body

- UserApiKeyCreateRequest
  - `name` string, required — Key name (1-100 characters)
  - `scopes` string, nullable — Comma-separated scopes (optional)
  - `expires_at` string, date-time, nullable — Expiration date (optional)

## Response `201`

API key created successfully

- UserApiKeyCreateResponse
  - `id` string
  - `name` string
  - `key` string — Full API key — only returned at creation time
  - `key_prefix` string
  - `scopes` string, nullable
  - `expires_at` string, date-time, nullable
  - `created_at` string, date-time

## Other responses

- `400` — Invalid request
- `401` — Unauthorized

---

[API](https://skmtc.dev/fim-ai/apis/fim-one-api.md) · [All operations](https://skmtc.dev/fim-ai/apis/fim-one-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/fim-ai/fim-one-api/revisions/6832c00d58dc/schema)
