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

# Change size

> Move a sandbox to a bigger or smaller size: stop it, then resume it with --type. Or fork it to a new size.

A running sandbox cannot change size. Stop it first, then resume it with the new size.

1. Stop the sandbox:

   ```bash theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
   boat stop bx_23456789
   ```

2. Wait until `boat info bx_23456789` shows the state `stopped`. The API reports a stopped sandbox as `archived`.

3. Resume it with the new size:

   ```bash theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
   boat resume bx_23456789 --type large
   ```

A resume with `--type` on a running sandbox fails with `409 sandbox_running_stop_first`. Nothing changes.

To get a copy at a new size and keep the source running, fork it:

```bash theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
boat fork bx_23456789 --type small
```

| Command | What changes |
| - | - |
| `resume --type` | The stopped sandbox itself gets the new size. |
| `fork --type` | The copy gets the new size. The source sandbox does not change. |

Resume and fork already restore a snapshot onto a new machine. So a size change costs nothing more than the resume or fork itself.

```bash CLI theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
boat stop   bx_23456789
until [ "$(boat info bx_23456789 --json | jq -r .sandbox.state)" = "stopped" ]; do sleep 2; done
boat resume bx_23456789 --type large
```

```bash curl theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
curl -sS -X POST https://boat.dev/api/v1/sandboxes/bx_23456789/stop \
  -H "Authorization: Bearer $BOAT_API_KEY"
# poll GET /sandboxes/bx_23456789 until state is "archived", then:
curl -sS -X POST https://boat.dev/api/v1/sandboxes/bx_23456789/resume \
  -H "Authorization: Bearer $BOAT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"type":"large"}'
```

```ts TypeScript theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
await sandbox.stop({ sandboxId: "bx_23456789" });
// poll sandbox.get({ sandboxId }) until state is "archived", then:
await sandbox.resume({ sandboxId: "bx_23456789", type: "large" });
```

```python Python theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
from boat_sdk.models.resume_request import ResumeRequest

sandbox.stop("bx_23456789")
# poll sandbox.get("bx_23456789") until state is "archived", then:
sandbox.resume("bx_23456789", resume_request=ResumeRequest(type="large"))
```

## Grow and shrink

* A move to a bigger size always works.
* `large` needs your first payment. `xlarge` needs the \$100 plan or higher.
* A move to a smaller size fails with `type_too_small` when the sandbox holds more data than the smaller size can take.
* After a refused move, the sandbox stays exactly as it was. You do not lose the sandbox.
* To shrink past that limit, delete data. Then let the sandbox make a new snapshot, and try again.

## Cost

A bigger size costs more per hour. The price per hour in [Sandbox sizes](https://docs.boat.dev/machines.md) is the full price.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.