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

# Create an API key

`POST /v1/api-keys`

Generates a new API key for the requesting user. The API key is returned in the response, and this is the only time it can be retrieved.

## Request body

- GenerateApiKeyRequest
  - `apikeyId` string, required — The identifier to use for the api key, which will become the final component of the api key's resource name. This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.

## Response `200`

A successful response.

- ApiKey
  - `createTime` string, date-time
  - `id` string
  - `key` string

## Other responses

- `default` — An unexpected error response.

---

[API](https://skmtc.net/cudocompute/apis/cudo-compute-service.md) · [All operations](https://skmtc.net/cudocompute/apis/cudo-compute-service/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cudocompute/cudo-compute-service/revisions/93dc40dababc/schema)
