Skip to main content
Create a new subaccount under the current account.

Signature

VastAI.create_subaccount(
    email: Optional[str] = None,
    username: Optional[str] = None,
    password: Optional[str] = None,
    type: Optional[str] = None
) -> str

Parameters

email
Optional[str]
Email address for the new subaccount.
username
Optional[str]
Username for the new subaccount.
password
Optional[str]
Password for the new subaccount.
type
Optional[str]
Account type for the subaccount.

Returns

str — Result from the API call.

Example

from vastai import VastAI

client = VastAI(api_key="YOUR_API_KEY")
result = client.create_subaccount()
print(result)