> ## Documentation Index
> Fetch the complete documentation index at: https://vastai-80aa3a82-auto-cli-sdk-preview-pr-398.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# VastAI.create_ssh_key

Create a new SSH key.

## Signature

```python theme={null}
VastAI.create_ssh_key(
    ssh_key: Optional[str] = None
) -> dict
```

## Parameters

<ParamField path="ssh_key" type="Optional[str]">
  add your existing ssh public key to your account (from the .pub file). If no public key is provided, a new key pair will be generated.
</ParamField>

## Returns

`dict`

## Example

```python theme={null}
from vastai import VastAI

client = VastAI(api_key="YOUR_API_KEY")
result = client.create_ssh_key()
print(result)
```
