`POST /sandboxes`

Boots a Firecracker microVM. All fields are optional; an empty body uses the daemon defaults. `image` boots from a converted OCI image (pulled on demand — see the images endpoints); a daemon without an image store answers 501.

### Authorizations

- `bearerAuth` — HTTP bearer. Daemon API key. Omit on a keyless loopback daemon.

### Request body

`application/json`

- `boot_args` string · optional
- `disk_bytes` integer (int64) · optional
- `image` ImageRef · optional
  - `oci` string · optional
  - `path` string · optional
- `memory_mib` integer · optional
- `network` NetworkRequest · optional
  - `allowlist` array of string · optional
  - `enabled` boolean · optional
- `profile` string · optional
- `publish` array of PortMapping · optional
  - `guest_port` integer · optional
  - `host_ip` string · optional
  - `host_port` integer · optional
  - `protocol` string · optional
- `pull` string · optional
- `service` WireServiceSpec · optional
  - `cmd` array of string | null · optional
  - `cwd` string · optional
  - `env` object · optional
  - `env_exact` boolean · optional
  - `log_buffer_bytes` integer · optional
  - `restart` WireRestartPolicy · optional
    - `max_retries` integer · optional
    - `policy` string · optional
  - `stop_grace_s` integer · optional
  - `stop_signal` string · optional
  - `user` string · optional
- `timeout_s` integer · optional
- `vcpus` integer · optional

### Responses

**201** — Created

`application/json`:

- `created_at` string (date-time) · optional
- `id` string · optional
- `memory_mib` integer · optional
- `network` NetworkResponse · optional
  - `allowlist` array of string · optional
  - `enabled` boolean · optional
  - `gateway` string · optional
  - `guest_ip` string · optional
- `profile` string · optional
- `published` array of PortMapping · optional
  - `guest_port` integer · optional
  - `host_ip` string · optional
  - `host_port` integer · optional
  - `protocol` string · optional
- `source_snapshot_id` string · optional
- `vcpus` integer · optional
- `workdir` string · optional

**400** — Bad Request

`application/json`:

- `error` string · optional

**403** — Forbidden

`application/json`:

- `error` string · optional

**500** — Internal Server Error

`application/json`:

- `error` string · optional

**501** — Not Implemented

`application/json`:

- `error` string · optional

**502** — Bad Gateway

`application/json`:

- `error` string · optional
