---
title: "Create API Key."
method: POST
path: "/v1/apikeys"
tags: ["apikeys"]
---

# Create API Key.

`POST /v1/apikeys`

Create a new API key for the authenticated account. Use a standard API key (ak_) or a restricted key (rk_) with RESOURCE_TYPE_ACCOUNT write scope.

## Request body

- ApiKeyCreateParameters
  - `name` string
  - `expires_at_ms` integer, nullable

## Response `200`

OK

- ApiKeyCreatedView
  - `id` string
  - `name` string
  - `key_secret` string
  - `expires_at_ms` integer, nullable

---

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