Skip to main content
DELETE
https://api.galadriel.com
/
v1
/
leases
/
{lease_id}
curl -X DELETE https://api.galadriel.com/v1/leases/lse_xyz123 \
  -H "Authorization: Bearer YOUR_API_TOKEN"
{
  "lease_id": "lse_xyz123",
  "status": "terminated",
  "terminated_at": "2025-11-11T18:00:00Z",
  "original_end_time": "2025-11-12T14:00:00Z",
  "hours_used": 4.0,
  "hours_remaining": 20.0,
  "rate": 1.40,
  "refund_amount": 448.00,
  "refunded_at": "2025-11-11T18:00:01Z"
}

Path Parameters

lease_id
string
required
The lease ID to terminate

Response

lease_id
string
The terminated lease ID
terminated_at
string
When the lease was terminated
refund_amount
number
Prorated refund for unused time
Termination is immediate. All pods will be deleted and access will be revoked within 60 seconds.
This action cannot be undone. Consider reselling unused time instead to recover more money.
curl -X DELETE https://api.galadriel.com/v1/leases/lse_xyz123 \
  -H "Authorization: Bearer YOUR_API_TOKEN"
{
  "lease_id": "lse_xyz123",
  "status": "terminated",
  "terminated_at": "2025-11-11T18:00:00Z",
  "original_end_time": "2025-11-12T14:00:00Z",
  "hours_used": 4.0,
  "hours_remaining": 20.0,
  "rate": 1.40,
  "refund_amount": 448.00,
  "refunded_at": "2025-11-11T18:00:01Z"
}

What Happens on Termination

  1. Immediate: All running pods are deleted
  2. Within 60 seconds:
    • Kubeconfig is invalidated
    • SSH access is revoked
    • Namespace is cleaned up
  3. Within 5 minutes: Refund is credited to your account

Alternative: Resell Instead

Consider reselling unused time to recover more money:
# Instead of terminating
curl -X DELETE https://api.galadriel.com/v1/leases/lse_xyz123

# Resell for better recovery
curl -X POST https://api.galadriel.com/v1/leases/lse_xyz123/resell \
  -d '{"limit_price": 1.20}'
See the Reselling Guide for details.