v1

latestOpenAPI 3.1.02026-07-13897404.3 KB
Accounts

create subaccount

Creates either a standalone user account or a subaccount under a parent account. Subaccounts can be restricted to host-only functionality.

CLI Usage: vastai create subaccount --email <email> --username <username> --password <password> [--type host]

post/api/v0/users/

Request body

emailstring required

User's email address

usernamestring required

Desired username

passwordstring required

Account password

host_onlyboolean

If true, account is restricted to host functionality only

parent_idstring

Parent account ID for subaccounts. Use "me" for current user.

ssh_keystring

Optional SSH public key

captchastring

Captcha token (required for non-subaccounts)

Example request

{
  "email": "user@example.com",
  "username": "testuser123",
  "password": "securepass123",
  "host_only": true,
  "parent_id": "me"
}

Response

Account created successfully

idinteger

User ID

usernamestring
emailstring
key_idinteger

API key for the new account

Example response

{
  "id": 12345,
  "username": "testuser",
  "email": "user@example.com",
  "key_id": 67890
}