CH·02CLI reference

gpu secrets

Store secrets once and hand them to instances, functions, and jobs

Store secrets once and hand them to instances, functions, and jobs

Synopsis

Organization secrets are values such as API keys and tokens that you store once and name on a launch. They reach the machine as environment variables of the same name.

Values are encrypted at rest and are never shown again after they are saved. Every read returns names and metadata only. Every create, update, delete, and use is recorded in your organization's audit log.

Use them with gpu instances create --secret NAME, gpu jobs submit --secret NAME, or @function(secrets=["NAME"]) in Python. Coming from Infisical? Run infisical export --format=json > secrets.json and then gpu secrets import --file secrets.json.

Secrets are off by default. On a deployment that does not offer them, these commands fail with this server has no such endpoint. See the secrets guide for how values are encrypted and delivered.

Examples

# Store a token (prompts without echo)
gpu secrets set HF_TOKEN

# Store one from a script
printf %s "$TOKEN" | gpu secrets set WANDB_API_KEY

# Use it
gpu instances create -t a100_80gb --secret HF_TOKEN

Options

  -h, --help   help for secrets

Options inherited from parent commands

      --api-base string   API base URL (override with GPUAI_API_BASE env) (default "https://api.gpu.ai/v1")
      --debug             Enable debug logging to stderr
  -o, --output string     Output format: table|json (default table on TTY, json otherwise)

SEE ALSO

← The gpu CLI