v1
latestOpenAPI 3.1.02026-07-13897404.3 KBAccounts
create ssh-key
Creates a new SSH key and associates it with your account. The key will be automatically added to all your current instances.
CLI Usage: vastai create ssh-key <ssh_key>
post/api/v0/ssh/
Request body
Example request
{
"ssh_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC..."
}Response
SSH key created successfully
Example response
{
"success": true,
"key": {
"id": 123,
"user_id": 456,
"public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC...",
"created_at": "2023-01-01T12:00:00Z"
}
}