Skip to main content
PUT
Replace registered SSH public keys

Authorizations

Authorization
string
header
required

Runpod API key authentication. Generate an API key in the Runpod console and send it in the Authorization header as Bearer <api_key>. Keys are scoped to the permissions granted when created; requests may return 403 when a valid key lacks access to the requested resource or action.

Console sessions (Clerk JWTs) act for the signed-in user. To act for a team instead, also send X-Team-Id: <team_id>; it applies only when the user owns or belongs to that team, otherwise the request runs against the user's own account. API keys created inside a team already act for that team and do not need the header.

Body

application/json
keys
string[]
required

The full set of SSH public keys to register — this is a complete replacement, not a merge. Each entry is an authorized_keys-style line: <type> <base64-key> [comment], e.g. from ~/.ssh/id_ed25519.pub. Send [] to remove all keys. These keys are provisioned into pods created with startSsh and authenticate both SSH paths reported in the pod's ssh block.

Pattern: ^(ssh|ecdsa|sk)-[^\s]+ [^\s]+([ \t][^\n\r]*)?$
Example:

Response

OK — the updated key set

keys
string[]
required

The account's registered SSH public keys, one authorized_keys-style entry per element (<type> <base64-key> [comment]).

Example:
Last modified on September 17, 2026