“Modal was the only infrastructure provider that enabled us to reliably run tens of thousands of app creation sessions in an instant. We’re excited to build with them for the long term.”
Create a sandbox with one line of code. You can dynamically define the sandbox environment at runtime.
sb = modal.Sandbox.create(
app=app,
image=modal.Image.debian_slim()
.uv_pip_install("numpy"),
)
Send commands to the sandbox from your application code.
p = sb.exec(
"python",
"-c",
"import numpy; print(numpy.__version__)"
)
print(p.stdout.read())
sb.exec(
"rm",
"-rf",
"--no-preserve-root",
"/"
)
Modal’s container stack spins up sandboxes in less than a second.
Instantly autoscale to 50,000+ sandboxes during peak demand.
Debug fast with our native observability interface.
Easily drill down into metrics, logs, and status for individual Sandboxes.
Only pay for what you use, by the CPU cycle. For GPU Sandboxes, refer to our standard GPU prices.
CPU
Physical core
(2 vCPU equivalent)
$0.00003942 / core / sec
Memory
$0.00000672 / GiB / sec