v1

latestOpenAPI 3.1.02026-07-13897404.3 KB
Accounts

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

ssh_keystring required

The public SSH key to add (from .pub file)

Example request

{
  "ssh_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC..."
}

Response

SSH key created successfully

successboolean

Example response

{
  "success": true,
  "key": {
    "id": 123,
    "user_id": 456,
    "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC...",
    "created_at": "2023-01-01T12:00:00Z"
  }
}