---
title: "Delete your stored BYOK LLM key"
method: DELETE
path: "/v1/llm/keys/{provider}"
tags: ["keys"]
---

# Delete your stored BYOK LLM key

`DELETE /v1/llm/keys/{provider}`

Scope: `llm_keys`. Requires a live API key; sandbox keys cannot modify the production credential store. Deletes the stored key for the provider — 404 LLM_KEY_NOT_FOUND when none exists. Schedules that opted into this provider then fail loudly at fire time with LLM_KEY_NOT_CONFIGURED; they never silently run on Coasty's platform keys. Deletion stops future stored-key lookups but does not revoke an encrypted snapshot already held by an active run or workflow, or the fixed create-time key held in memory by an active session. Cancel active runs/workflows and DELETE /v1/sessions/{session_id} for active sessions to stop further calls; terminal run transition scrubs ciphertext. Provider-side revocation stops the key upstream.

A key-store outage returns 503 DB_UNAVAILABLE with Retry-After, not a bare 500. The same distinction applies when a request resolves a stored BYOK key: a store outage is a retryable 503, and 422 LLM_KEY_INVALID is reserved for a key the provider actually rejected.

## Response `200`

Deleted.

- DeleteLlmKeyResponse
  - `deleted` true, required

## Other responses

- `400` — Invalid request body or parameters.
- `401` — Missing, invalid, or revoked API key. Pass `X-API-Key: sk-coasty-live-...` (or test).
- `403` — API key lacks the required scope or tier-feature is unavailable on the caller's plan.
- `404` — Resource not found in this key's namespace.
- `409` — The resource state conflicts with this operation.
- `413` — The request body exceeds the endpoint limit.
- `422` — The JSON shape is valid but one or more values violate the endpoint contract.
- `429` — Rate or concurrency limit exceeded.
- `500` — Unexpected server error. Retry with exponential backoff.
- `502` — An upstream dependency returned an invalid response.
- `503` — A required service is temporarily unavailable.
- `504` — An upstream dependency timed out.

---

[API](https://skmtc.net/coasty/apis/coasty-public-api.md) · [All operations](https://skmtc.net/coasty/apis/coasty-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/coasty/coasty-public-api/versions/f50d93b0d8a1/schema)
