---
title: "POST /v1/keys"
method: POST
path: "/v1/keys"
---

# POST /v1/keys

`POST /v1/keys`

## Request body

- object
  - `name` string — Optional human-readable name of the API key.
  - `limit` object — Optional spending limit configuration.
    - `retention` 'no_reset' | 'day' | 'week' | 'month' — Limit period.
    - `threshold` number — Spending limit threshold for the selected period, in USD.
  - `scopes` string[], nullable — List of model access scopes assigned to the key. Defines which categories of models can be called using this API key.

## Response `200`

API key creation result

- object
  - `data` object, required
    - `name` string, nullable — Human-readable, user-defined name for the API key.
    - `disabled` boolean, required — Indicates whether the key is disabled.
    - `prefix` string, required — Key prefix. This is the first 8 characters of your API key, visible in the dashboard.
    - `scopes` string[], nullable, required — List of model access scopes assigned to the key. Defines which categories of models can be called using this API key.
    - `limit` object — Applied spending limits.
      - `retention` 'no_reset' | 'day' | 'week' | 'month' — Limit period.
      - `threshold` number — Spending limit threshold for the selected period, in USD
    - `created_at` string, date-time, required — Creation timestamp (UTC).
    - `updated_at` string, date-time, required — Last update timestamp (UTC).
    - `monthly_usage` number, required — Current monthly usage amount.
    - `key` string, required — Full API key value (returned only at creation time).

---

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