---
title: "revoke llm_key"
method: DELETE
path: "/llm_keys/{id}"
tags: ["LlmKeys"]
---

# revoke llm_key

`DELETE /llm_keys/{id}`

## Request

- Base URL: `https://api.aptible.com`
- URL: `https://api.aptible.com/llm_keys/{id}`
- Auth: API key in header `Authorization`

Revokes and deletes the specified LLM key.

## Path parameters

- `id` integer, required

## Response `200`

successful

- LlmKey
  - `id` integer, required: Database ID of the LLM Key
  - `_type` string, required
  - `handle` string, required: User-provided handle for the token (unique within account)
  - `note` string, required: User-provided note (URL-safe base64 encoded)
  - `created_at` string, dateTime, required
  - `updated_at` string, dateTime, required
  - `gateway_url` string, required: Customer-facing LLM Gateway endpoint URL
  - `created_by` object, required: User who created the token
  - `revoked_at` string, dateTime, required: Timestamp when token was revoked
  - `revoked_by` object, required: User who revoked the token
  - `status` string, required: Token status (ACTIVE or REVOKED)
  - `token` string: Secret API key value (only present on creation)
  - `current_usage` LlmKeyCurrentUsage: Month-to-date usage metrics for this key
    - `spend` number: Total spend in USD
    - `input_tokens` integer: Total input (prompt) tokens
    - `output_tokens` integer: Total output (completion) tokens
    - `successful_requests` integer: Total successful API requests
    - `failed_requests` integer: Total failed API requests
  - `_links` BackupRetentionPolicyLinks
    - `account` ListAccountsForStack200ResponseLinksStack
      - `href` string, uri
    - `self` ListAccountsForStack200ResponseLinksStack
      - `href` string, uri

## Other responses

- `403`: organization not enrolled
- `404`: not found
- `default`: Error response. Often a 4xx or 5xx status code

## Changes

- **2026-07-15** `5c71f4c63067`: 1 info
  - added the optional property `current_usage` to the response with the `200` status
- **2026-01-22** `d672fa4895b3`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/aptible/apis/aptible-api-v1/changes/llm_keys/:id/delete.md)

---

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