Vast.ai API
Instances

detach ssh-key

1min
DELETE
https://console.vast.ai/api/v0/instances/{id}/ssh/{key}/
Production server

Detaches an SSH key from a specified instance, removing SSH access for that key.

CLI Usage: vastai detach <instance_id> <ssh_key_id> Example: vastai detach 99999 12345

Authentication
BearerAuth
Path Parameters
id
*
key
*
Responses
200
SSH key successfully detached
success
msg
400
Bad Request
success
error
msg
404
Instance or SSH key not found
success
error
msg
429
Too Many Requests
detail
500
Internal Server Error
success
error
msg




Updated 06 Feb 2025
Did this page help you?