---
title: "Create a workspace API key"
method: POST
path: "/api/workspace/api-keys"
tags: ["workspace"]
---

# Create a workspace API key

`POST /api/workspace/api-keys`

[cloud-only] Creates a new API key for the current workspace.

## Request body

- object
  - `name` string, required — Display name for the API key

## Response `201`

API key created

- WorkspaceApiKeyCreated — [cloud-only] A newly created workspace API key, including the full secret value (shown only once).
  - `id` string, required
  - `name` string, required
  - `key` string, required — Full API key value (only returned on creation)
  - `prefix` string
  - `created_at` string, date-time

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `403` — Forbidden

## Changes

- **2026-05-08** `c9640fded659` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/comfy-org/apis/comfyui-api/changes/api/workspace/api-keys/post.md)

---

[API](https://skmtc.dev/comfy-org/apis/comfyui-api.md) · [All operations](https://skmtc.dev/comfy-org/apis/comfyui-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/comfy-org/comfyui-api/revisions/c9640fded659/schema)
