---
title: "Create Api Key"
method: POST
path: "/api/keys"
tags: ["api-keys"]
---

# Create Api Key

`POST /api/keys`

Create a new API key for the authenticated user.

Requires: JWT token (session cookie or Authorization header)

Request body:
    {
        "name": "Production Key"
    }

Returns:
    {
        "id": 123,
        "key": "qd_live_abc123...",
        "name": "Production Key",
        "created_at": "2025-01-15T10:30:00Z",
        "warning": "Save this key now. You won't be able to see it again!"
    }

Note: The full API key is only shown once. Store it securely!

## Request body

- CreateKeyRequest — Request model for creating an API key.
  - `name` string, required

## Response `201`

Successful Response

- CreateKeyResponse — Response model for created API key.
  - `id` integer, required
  - `key` string, required
  - `name` string, required
  - `created_at` string, required
  - `warning` string

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/quadrillion/apis/quadrillion-cloud-api.md) · [All operations](https://skmtc.net/quadrillion/apis/quadrillion-cloud-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/quadrillion/quadrillion-cloud-api/versions/399077308c86/schema)
