---
title: "revoke llm_gateway_key"
method: DELETE
path: "/llm_gateway_keys/{id}"
tags: ["LlmGatewayKeys"]
---

# revoke llm_gateway_key

`DELETE /llm_gateway_keys/{id}`

## Request

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

Revokes the specified LLM Gateway key. Available to the organization's owners and to
whoever created the key. Revoking a key that is already revoked returns it unchanged.

## Path parameters

- `id` integer, required

## Query parameters

- `no_embed` boolean

## Headers

- `Prefer` 'no_sensitive_extras=true'

## Response `200`

successful

- LlmGatewayKey
  - `id` integer, required: Database ID of the LLM Gateway Key
  - `_type` string, required
  - `handle` string, required: User-provided handle for the key (unique within the organization)
  - `note` string, required: User-provided note
  - `spend_limit` string, required: Spend limit in USD for this key (decimal, serialized as string). Null means the key has no limit of its own. Never exceeds the organization's spend_limit: lowering that lowers any key that was above it.
  - `organization_id` string, required: The organization this key belongs to
  - `created_at` string, dateTime, required
  - `updated_at` string, dateTime, required
  - `gateway_url` string, required: Customer-facing LLM Gateway endpoint URL
  - `token_prefix` string, required: The first characters of the key's token, safe to display and enough to tell keys apart
  - `created_by` object, required: User who created the key
  - `revoked_at` string, dateTime, required: Timestamp when the key was revoked
  - `revoked_by` object, required: User who revoked the key
  - `status` string, required: Key status (ACTIVE or REVOKED)
  - `token` string: Secret API key value (only present on creation)
  - `_links` LlmGatewayKeyLinks
    - `operations` ListAccountsForStack200ResponseLinksStack
      - `href` string, uri
    - `self` ListAccountsForStack200ResponseLinksStack
      - `href` string, uri

## Other responses

- `403`: organization not enrolled, or the caller may not revoke this key
- `404`: not found
- `default`: Error response. Often a 4xx or 5xx status code

## Changes

- **2026-10-20** `ba72edfe0324`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/aptible/apis/aptible-api-v1/changes/llm_gateway_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)
