Skip to main content
DELETE
/
keys
/
{key_id}
Delete API Key
curl --request DELETE \
  --url https://api.fal.ai/v1/keys/{key_id} \
  --header 'Authorization: <api-key>'
import requests

url = "https://api.fal.ai/v1/keys/{key_id}"

headers = {"Authorization": "<api-key>"}

response = requests.delete(url, headers=headers)

print(response.text)
const options = {method: 'DELETE', headers: {Authorization: '<api-key>'}};

fetch('https://api.fal.ai/v1/keys/{key_id}', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "error": {
    "type": "authorization_error",
    "message": "Authentication required"
  }
}
{
  "error": {
    "type": "authorization_error",
    "message": "Access denied"
  }
}
{
  "error": {
    "type": "rate_limited",
    "message": "Rate limit exceeded"
  }
}
{
  "error": {
    "type": "server_error",
    "message": "An unexpected error occurred"
  }
}

Authorizations

Authorization
string
header
required

Admin API key must be prefixed with "Key ", e.g. Authorization: Key YOUR_ADMIN_API_KEY

Headers

Idempotency-Key
string

Optional idempotency key for safe request retries

Example:

"550e8400-e29b-41d4-a716-446655440000"

Path Parameters

key_id
string
required

Unique identifier of the API key to delete

Minimum string length: 1
Example:

"abc123def456"

Response

API key deleted successfully (or already deleted)