---
title: "Create an API key"
method: POST
path: "/orgs/{org_id}/keys"
tags: ["keys"]
---

# Create an API key

`POST /orgs/{org_id}/keys`

Creates a new API key for the organization. Members may only create user keys for themselves. The plaintext key is returned exactly once.

## Path parameters

- `org_id` string, required

## Request body

- InternalApiAdminCreateAPIKeyRequest
  - `daily_token_limit` integer
  - `expires_at` string
  - `key_type` string
  - `monthly_token_limit` integer
  - `name` string
  - `requests_per_day` integer
  - `requests_per_minute` integer
  - `service_account_id` string
  - `team_id` string
  - `user_id` string

## Response `201`

Created

- InternalApiAdminCreateAPIKeyResponse
  - `created_at` string
  - `created_by` string
  - `daily_token_limit` integer
  - `expires_at` string
  - `id` string
  - `key` string
  - `key_hint` string
  - `key_type` string
  - `monthly_token_limit` integer
  - `name` string
  - `org_id` string
  - `requests_per_day` integer
  - `requests_per_minute` integer
  - `service_account_id` string
  - `team_id` string
  - `updated_at` string
  - `user_id` string

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `500` — Internal Server Error

---

[API](https://skmtc.dev/voidmind-io/apis/untitled-api.md) · [All operations](https://skmtc.dev/voidmind-io/apis/untitled-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/voidmind-io/untitled-api/revisions/1405e7d9c155/schema)
