---
title: "Revoke an app's key to the machine's AI gateway"
method: DELETE
path: "/api/nodes/{node_id}/ai-gateway/keys/{service}"
tags: ["nodes"]
---

# Revoke an app's key to the machine's AI gateway

`DELETE /api/nodes/{node_id}/ai-gateway/keys/{service}`

## Request

- Base URL: `https://app.nerdit.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://app.nerdit.ai/api/nodes/{node_id}/ai-gateway/keys/{service}`
- Auth: none declared

Forward ``DELETE /api/ai-gateway/keys/{service}`` with a fresh ``Idempotency-Key``.

The app's AI calls answer 401 until it restarts and gets a new key. The
daemon's 404 (no such app) and 403 (an app the console's link does not
own, e.g. deployed locally: daemon 0.8.3+) pass through in its words.

## Path parameters

- `service` string, required
- `node_id` string, uuid, required

## Response `200`

Successful Response

- NodeAiAppKeyRevokeView
  - `service` string, required
  - `revoked` integer, required

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `409`: Conflict
- `422`: Unprocessable Content
- `429`: Too Many Requests
- `502`: Bad Gateway

---

[API](https://skmtc.dev/nerdit/apis/nerdit-cloud-web.md) · [All operations](https://skmtc.dev/nerdit/apis/nerdit-cloud-web/llms.txt) · [OpenAPI document](https://skmtc.dev/nerdit/apis/nerdit-cloud-web/revisions/06e3b44b58be?raw)
