---
title: "Rotate API key"
method: POST
path: "/v1/keys/rotate"
tags: ["agent"]
---

# Rotate API key

`POST /v1/keys/rotate`

## Request

- Base URL: `https://api.lithtrix.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.lithtrix.ai/v1/keys/rotate`
- Auth: none declared

Replace the stored key hash with a new `ltx_` key. The previous key stops working immediately after this call succeeds.

## Headers

- `authorization` string, nullable

## Response `200`

Successful Response

- KeyRotateResponse: One-time new key after rotation.
  - `api_key` string, required
  - `message` string

## Other responses

- `422`: Validation Error

---

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