What are Modal Sandboxes?
Modal is a serverless compute platform for running compute-intensive or highly parallel AI workloads in the cloud. Modal's proprietary container stack enables blazing fast cold starts for rapid developer iteration and production-grade scalability. Sandboxes are built on top of this container stack and are specifically used to define containers at runtime and safely run LLM-generated code. Like other Modal products, Sandboxes autoscale up and down from 0 to 10,000s of containers and are easily managed via Modal's simple SDK.
What are Fly Machines?
Fly.io is a distributed cloud VM platform for application deployments. Fly specializes in running applications close to where end users are. Unlike Modal's function-based serverless approach, Fly is primarily used for the deployment of application backends on stateful VMs. Fly Machines are VMs that can be managed via Fly's CLI or REST API. They are the compute primitive underlying Fly's app deployment product, but they can also be managed directly.
Performance and scalability
Enterprise-level scaling to 10,000+ sandboxes | ||
Proven network reliability at scale | ||
Sub-second container cold starts | ||
Filesystem snapshotting for fast custom container creation | ||
Memory snapshotting for fast restores | ||
Multi-region support | ||
White-glove engineering support to optimize your deployments |
Lovable uses Modal to power
millions of AI-generated apps
Lovable is the fastest-growing platform for creating AI-generated apps. They use Modal Sandboxes at massive scale to run LLM-generated code during user sessions.
"We've previously managed to break services like GitHub because of our load, so when Modal was able to handle the massive scale of our AI weekend event so smoothly, that meant a lot. We trust Modal to keep up with our growth in the long term."

In a single weekend, Modal powered 250,000 user app creations for Lovable with no downtime. Not only that, Lovable reduced their sandbox orchestration code from 15,000 lines to 700 lines, ensuring long-term maintainability of this infrastructure.
Features
Run arbitrary LLM-generated code in an isolated environment | ||
Support for custom images | ||
Support for dynamic, runtime image builds per sandbox | ||
Data storage | ||
Built-in sandbox state management | ||
Built-in tunnel feature for direct external connections to sandboxes | ||
Built-in distributed file system that can be attached to sandboxes | ||
First-party log collection and telemetry integrations | ||
Multi-region support | ||
Persistent VMs |
Developer experience
Infrastructure defined in application code | ||
Python, JavaScript, Go SDKs | ||
Create sandboxes with one line of code | ||
No YAML or Dockerfiles needed | ||
Easy-to-use network control features | ||
Granular and intuitive observability features | ||
Environments | ||
Build a proof of concept in days, not months |
Security and enterprise readiness
SOC 2 Type II | ||
HIPAA | ||
Static IP proxies | ||
Granular control over outbound networking |
Choose Modal Sandboxes for:
Robust, reliable sandboxes at enterprise scale |
Rich feature set specific for code sandboxes, including tunnels and state management |
Streamlined developer experience that is code-first and low on infrastructure configuration |
Choose Fly Machines for:
Stateful VMs for long-running processes in your application backend |