Skip to main content
POST
/
me
/
ssh-keys
Create an SSH key
curl --request POST \
  --url https://console.gmicloud.ai/api/v1/me/ssh-keys \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "sshKey": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBn... user@host",
  "name": "My SSH key"
}'
{
  "id": "550e8400-e29b-41d4-a716-446655440000"
}

Authorizations

Authorization
string
header
required

An access token used to authenticate a user and grant access to restricted APIs. It is issued by session APIs. For status codes related to this header, refer to the Common Headers Documentation.

Body

application/json

The request body for SSH key creation.

sshKey
string
required

The full SSH public key supported by OpenSSH (e.g., ssh-rsa, ssh-ed25519, ecdsa-sha2-nistp256).

Example:

"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBn... user@host"

name
string
required

Human-readable name for the SSH key.

Example:

"My SSH key"

Response

Successfully created an SSH key.

id
string<uuid>

The unique identifier (UUID) of the newly created SSH key.

Example:

"550e8400-e29b-41d4-a716-446655440000"