---
title: "POST /v1/llm/keys"
method: POST
path: "/v1/llm/keys"
tags: ["LLM"]
---

# POST /v1/llm/keys

`POST /v1/llm/keys`

Issues an LLM API key scoped to the requested models. The key may only call the listed model names; calls to anything else are rejected. Expires after `duration` (1-99 hours or minutes, e.g. `72h` or `30m`; default 72h).

## Headers

- `Authorization` string

## Request body

- object
  - `models` string[], required
  - `duration` string
  - `purpose` 'code_review'
  - `operationId` string, uuid
  - `billingRoundId` string, uuid
  - `orgId` string, uuid

## Response `201`

Default Response

- object
  - `links` object, required
    - `self` string, uri, required
  - `data` object, required
    - `id` string, required
    - `type` 'llm-key', required
    - `attributes` object, required
      - `key` string, required
      - `expiresAt` string, date-time, required
      - `organization` object
        - `id` string, required
        - `name` string, required

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `500` — Internal Server Error

## Changes

- **2026-09-15** `d50a02b79ad3` — 2 info
  - added the optional property `error/code` to the response with the `403` status
  - added the optional property `error/url` to the response with the `403` status
- **2026-09-13** `4b753c0f273e` — 1 info
  - added the new optional request property `billingRoundId`
- **2026-09-09** `1de33e42f781` — 2 info
  - added the new optional request property `orgId`
  - added the optional property `data/attributes/organization` to the response with the `201` status
- **2026-08-12** `eeff7d9ca852` — 2 info
  - added the new optional request property `operationId`
  - added the new optional request property `purpose`

[Change history](https://skmtc.dev/tessl/apis/tessl-api/changes/v1/llm/keys/post.md)

---

[API](https://skmtc.dev/tessl/apis/tessl-api.md) · [All operations](https://skmtc.dev/tessl/apis/tessl-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tessl/apis/tessl-api/revisions/ee9b4e55fec4?raw)
