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

# Create API Key

`POST /keys`

Creates a new API key with the specified alias.

**Requirements:**
- Authentication required via admin API key

**Important Security Notice:**
The `key_secret` is only returned once at creation time. Store it securely immediately
as it cannot be retrieved again. If lost, you must delete the key and create a new one.

**Key Features:**
- Create API keys programmatically without UI access
- Assign meaningful aliases for key identification
- Keys are immediately active upon creation

**Common Use Cases:**
- Programmatic key provisioning for CI/CD pipelines
- Self-serve key generation for team members
- Automated key rotation workflows
- Integration with secret management systems

## Request body

- object — Request body for creating a new API key
  - `alias` string, required — Required friendly name for the API key

## Response `201`

API key created successfully. Store the key_secret securely - it will not be shown again.

- object — Response containing the newly created API key credentials. The key_secret is only returned once.
  - `key_id` string, required — Unique identifier for the newly created API key
  - `key_secret` string, required — Secret portion of the API key. IMPORTANT: This is only returned once at creation time and cannot be retrieved again.
  - `key` string, required — Full API key in the format 'key_id:key_secret'. Use this value directly for API authorization. IMPORTANT: This is only returned once at creation time and cannot be retrieved again.

## Other responses

- `400` — Invalid request parameters
- `401` — Authentication required
- `403` — Access denied
- `429` — Rate limit exceeded
- `500` — Internal server error

---

[API](https://skmtc.dev/fal/apis/platform-apis.md) · [All operations](https://skmtc.dev/fal/apis/platform-apis/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/fal/platform-apis/revisions/0c7dabf80b00/schema)
