tool-settings

Set Sandbox Credential

Changed on

Store the key this deployment's hosted sandbox provider leases sandboxes with.

Wins over the provider's environment variable (E2B_API_KEY), on this worker at once and on every other within 30 seconds, so a rotated key needs no redeploy. Refused for the protocol provider, which takes no key of its own. Operator-gated.

put/api/v1/tool-settings/sandbox/credential

Request

  • The document declares no server URL.
  • Auth
    • API key in header Otari-Key
    • or API key in header x-api-key

Request body

api_keystring required

Example request

{
  "api_key": "e2b_0123456789abcdef"
}

Response

Successful Response

env_varstring required

The environment variable a deployment that stores no key is read from.

last4string nullable

The key's last four characters, to tell keys apart.

source'stored' | 'environment' nullable required

'stored' for a key set here, which wins; 'environment' for the provider's own environment variable; null when there is neither and code execution fails until one is set.

Changes