v1

latestOpenAPI 3.1.02026-07-13897404.3 KB
Accounts

create env-var

Creates a new encrypted environment variable for the authenticated user. Keys are automatically converted to uppercase. Values are encrypted before storage. There is a limit on the total number of environment variables per user.

CLI Usage: vastai create env-var <key> <value>

post/api/v0/secrets/

Request body

keystring required

Environment variable key name (will be converted to uppercase)

valuestring required

Secret value to be encrypted and stored

Example request

{
  "key": "API_TOKEN",
  "value": "abc123xyz"
}

Response

Environment variable created successfully

successboolean
msgstring

Example response

{
  "success": true,
  "msg": "Environment variable added successfully"
}