> ## Documentation Index
> Fetch the complete documentation index at: https://docs.verial.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Sandboxes

> SDK methods for the Sandboxes resource.

REST reference: [/api-reference/resources/sandboxes](/api-reference/resources/sandboxes).

## Methods

```typescript theme={null}
verial.sandboxes.list({ playgroundId?, cursor?, limit? })
verial.sandboxes.create({ simulatorId })
verial.sandboxes.get({ id })
verial.sandboxes.listEvents({ id, cursor?, limit? })
verial.sandboxes.teardown({ id })
verial.sandboxes.addDataset({ sandboxId, datasetId })
verial.sandboxes.removeDataset({ sandboxId, datasetId })
```

## Example

```typescript theme={null}
const sandbox = await verial.sandboxes.create({ simulatorId: 'sim_01H...' })
const details = await verial.sandboxes.get({ id: sandbox.id })
console.log(details.credentials)

for await (const event of await verial.sandboxes.listEvents({ id: sandbox.id })) {
  console.log(event.action, event.resource, event.key)
}

await verial.sandboxes.teardown({ id: sandbox.id })
```

See [Sandbox credentials by simulator type](/api-reference/resources/sandboxes#credentials-by-simulator-type) for the shape of `details.credentials`.
