Start a sandbox process with secrets
Changed onStarts a process in a running sandbox with secrets as environment variables for that process only. Pass secrets, a vault, onePassword fields, or any of them together: the vault's variables come first and secrets is merged over them, while a 1Password variable can't also come from another source. Values are decrypted on the sandbox's host and never returned; a totp secret sets the code current when the process starts, and onePassword fields are read from 1Password at that moment. Not supported on GPU sandboxes. Secrets are enabled for teams on request; please contact support to enable them (otherwise 403 SECRETS_FEATURE_DISABLED). Restricted API keys need both the sandboxes.read and secrets.use scopes. Don't retry blindly after a 502 SECRET_PROCESS_OUTCOME_UNKNOWN: the process may have started, so check the sandbox's process list first.
Request
- Base URLhttps://api.hyperbrowser.ai
- AuthAPI key in header x-api-key
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
Sandbox ID.
Request body
Example request
{
"secrets": {
"OPENAI_API_KEY": {
"name": "openai-key"
}
},
"onePassword": {
"fields": {
"SC_USER": {
"item": "scrapingcourse login",
"field": "username"
},
"SC_OTP": {
"item": "scrapingcourse login",
"section": "Security",
"field": "one-time password?attribute=otp"
}
}
}
}Response
Success
Changes
- breaking
added to the
request propertyallOflist - breaking
the
/////request property type changed fromstringto no type - breaking
the
request property type changed fromstringto no type - info
added the new optional request property
////// - info
added
subschema #1to the/////request propertyoneOflist - info
removed the pattern
^[a-zA-Z0-9][a-zA-Z0-9_-]{0,127}$from the request property///// - info
removed the pattern
^[a-zA-Z0-9][a-zA-Z0-9_-]{0,127}$from the request property
- breaking
- warning
added the new
onePasswordenum value to the////response property for the response status - warning
added the new
onePasswordenum value to the///response property for the response status - info
added the new optional request property
- warning