Reference
Fork
Snapshot a running sandbox and spawn N copies from that state.
POST
Documentation Index
Fetch the complete documentation index at: https://docs.podflare.ai/llms.txt
Use this file to discover all available pages before exploring further.
Parent sandbox id.
Number of children to spawn. Range 1..=32.
What children inherit
Each child starts from the parent’s state at the moment of snapshot:- Python REPL state — variables, imports, open files.
- Filesystem — everything written to the parent’s rootfs so far.
- Full VM memory — page-level CoW shared with siblings; divergence only costs the pages a child mutates.
Parent impact
- Paused for ~80 ms during snapshot. Resume is automatic.
execcalls on the parent made afterforkreturns are NOT visible in children. Each child only sees pre-fork state.
Timing (Hetzner EX63)
| n | Total fork latency |
|---|---|
| 1 | 92 ms |
| 2 | 102 ms |
| 5 | 101 ms |

