POST
/
api
/
v0
/
ssh
/
create ssh-key
curl --request POST \
  --url https://console.vast.ai/api/v0/ssh/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "ssh_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC..."
}'
{
  "success": true,
  "key": {
    "id": 123,
    "user_id": 456,
    "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC...",
    "created_at": "2023-01-01T12:00:00Z",
    "deleted_at": null
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
ssh_key
string
required

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

Example:

"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC..."

Response

SSH key created successfully

success
boolean
Example:

true

key
object