---
title: "Terminate a rental"
method: POST
path: "/v2/on-demand/rentals/terminate"
tags: ["rentals"]
---

# Terminate a rental

`POST /v2/on-demand/rentals/terminate`

## Request

- Base URL: `https://api.hyperbolic.ai`
- URL: `https://api.hyperbolic.ai/v2/on-demand/rentals/terminate`
- Auth: HTTP bearer

Terminate a virtual machine or bare metal rental.

## Request body

- object
  - `rentalId` union, required
    - string: The rental's `rentalId`.
    - integer: Deprecated. The rental's legacy numeric id; use `rentalId`.
  - `reason` string

## Response `200`

Successful response

- RentalTermination: Confirmation that a rental is terminating.
  - `message` string, required
  - `rentalId` string, required

## Other responses

- `400`: Invalid input data
- `401`: Authorization not provided
- `403`: Insufficient access
- `500`: Internal server error

## Changes

- **2026-10-14** `e5723257832a`: 1 breaking, 1 info
  - removed `subschema #1, subschema #2` from the `rentalId` request property `anyOf` list
  - added `subschema #1, subschema #2` to the `rentalId` request property `anyOf` list
- **2026-10-08** `788c6928f524`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/hyperbolic/apis/castle-api/changes/v2/on-demand/rentals/terminate/post.md)

---

[API](https://skmtc.dev/hyperbolic/apis/castle-api.md) - [All operations](https://skmtc.dev/hyperbolic/apis/castle-api/llms.txt) - [OpenAPI document](https://skmtc.dev/hyperbolic/apis/castle-api/revisions/d4d4f25214b8?raw)
