---
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

## Changes

- **2026-05-27** `d3ddb452754c` — 1 breaking
  - the request property `expires_at_ms` became not nullable
- **2026-04-13** `5b536a11a713` — 1 info
  - endpoint added
- **2025-12-13** `370a5d676ff0` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/runloopai/apis/runloop-api/changes/v1/apikeys/post.md)

---

[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)
