Skip to navigation

Add an SSH key

Add an SSH public key to your account. Send the contents of a .pub file, for example ~/.ssh/id_ed25519.pub; the private key stays on your computer. Adding a key that is already on the account returns it unchanged with 200.

With generate: true the key pair is created for you and the response carries the private key once, as private_key. It is not stored and cannot be shown again. Save it to a file with permissions 600 and use it for both hosts of the SSH command: ssh -i <key> -o ProxyCommand="ssh -i <key> -p <port> -W %h:%p ssh.empiriolabs.ai" root@gpu-<instance_id>.

There is no charge for SSH keys.

Authentication

AuthorizationBearer

Pass your EmpirioLabs API key as a bearer token. The Anthropic-style x-api-key header is also accepted on every endpoint.

Request

This endpoint expects an object.
public_keystringOptional<=8192 characters

One ssh-ed25519 or ssh-rsa public key (RSA 2048 to 8192 bits), without options or line breaks. A trailing comment is used as the default name. Send this or generate, not both.

generatebooleanOptional

Create a new Ed25519 key pair instead of sending one. The response carries private_key once and it is not stored, so save it before you close the response.

namestringOptional<=64 characters
A label for the key. Defaults to the key's comment.

Response

The key was already on the account.
keyobjectOptional

Errors

400
Bad Request Error
409
Conflict Error
413
Content Too Large Error