Sandbox({ apiKey }) constructor establishes a secure connection between your application and Fermion’s backend infrastructure, authenticating every subsequent operation you perform. This step does not immediately spin up a container, instead, it prepares the client instance for later actions such as creating new sandboxes, reconnecting to saved sessions, or running commands. Supplying a valid API key is mandatory, as it ensures that all sandbox operations are securely tied to your account and usage environment.
new Sandbox({ apiKey })
Description:
Creates a new Sandbox client instance. This does not create a container yet - call create() or fromSnippet() after initialization.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| apiKey | string | Yes | Your Fermion API key from the dashboard |
Sandbox instance
Example:
- Error if apiKey is null, undefined, or empty string
