---
title: "Create a new API key"
method: POST
path: "/v1/api-keys/create"
tags: ["API Keys"]
---

# Create a new API key

`POST /v1/api-keys/create`

Create a new API key for the authenticated user. System defaults: wq_ prefix, 1000 requests per 24 hours rate limit, no expiration, free plan metadata.

## Request body

- object
  - `name` string, required

## Response `201`

API key created successfully

- object
  - `success` true, required
  - `data` object, required
    - `id` string, required
    - `name` string, nullable, required
    - `start` string, nullable, required — First few characters of the key for identification
    - `prefix` string, nullable, required
    - `userId` string, required
    - `enabled` boolean, required
    - `requestCount` number, required
    - `remaining` number, nullable, required — Remaining uses (if limited)
    - `lastRequest` string, nullable, required
    - `expiresAt` string, nullable, required
    - `createdAt` string, required
    - `updatedAt` string, required
    - `metadata` object, nullable, required
    - `key` string, required — Complete API key - shown only once during creation
  - `creditsCost` number — Credits consumed by this operation
  - `requestId` string, uuid, required — Unique request identifier for tracing
  - `timestamp` string, date-time, required — ISO timestamp when the response was generated

## Other responses

- `401` — Authentication required
- `422` — Validation error
- `500` — Internal server error

---

[API](https://skmtc.net/weblinq/apis/weblinq-api.md) · [All operations](https://skmtc.net/weblinq/apis/weblinq-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/weblinq/weblinq-api/revisions/364690cf91b7/schema)
