{"slug":"blockrun-ai-api-v1-modal-sandbox-create-9d39b4","title":"Create a managed Python 3.11 sandbox","host":"blockrun.ai","method":"POST","resource":"https://blockrun.ai/api/v1/modal/sandbox/create","category":"code","description":"Create a managed Python 3.11 sandbox. Two billing modes selected by 'timeout': ≤300s = flat rate (CPU $0.01, GPU varies). >300s = per-hour billing for the full requested lifetime, no refund on early terminate. Max 24h.","price_listed":0.011,"price_asked":0.011,"state":"answering","state_label":"Answering","checks_7d":1,"answered_7d":1,"latency_ms_median":248,"reported_calls_30d":12,"reported_payers_30d":6,"networks":["eip155:8453"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"bodyFields":{"cpu":{"description":"CPU cores (max 1 CPU-only, 8 for GPU sandboxes, default: 1)","type":"number"},"gpu":{"description":"Optional GPU type. One of: T4, L4, A10G, A100, H100. Flat (≤300s): T4 $0.05, L4 $0.08, A10G $0.1, A100 $0.2, H100 $0.4. Hourly: T4 $1.5, L4 $2, A10G $2.5, A100 $4, H100 $8/hour.","type":"string"},"image":{"description":"Managed image. Only `python:3.11` is currently available.","type":"string"},"memory":{"description":"Memory in MB (max 1024 CPU-only, 32768 for GPU sandboxes, default: 512)","type":"number"},"timeout":{"description":"Sandbox lifetime in seconds (max 86400 = 24h, default: 300). >300s switches to hourly billing.","type":"number"}},"discoverable":true,"method":"POST","type":"http"},"output_schema":{"properties":{"input":{"properties":{"body":{"properties":{"cpu":{"description":"CPU cores (max 1 CPU-only, 8 for GPU sandboxes, default: 1)","type":"number"},"gpu":{"description":"Optional GPU type. One of: T4, L4, A10G, A100, H100. Flat (≤300s): T4 $0.05, L4 $0.08, A10G $0.1, A100 $0.2, H100 $0.4. Hourly: T4 $1.5, L4 $2, A10G $2.5, A100 $4, H100 $8/hour.","type":"string"},"image":{"description":"Managed image. Only `python:3.11` is currently available.","type":"string"},"memory":{"description":"Memory in MB (max 1024 CPU-only, 32768 for GPU sandboxes, default: 512)","type":"number"},"timeout":{"description":"Sandbox lifetime in seconds (max 86400 = 24h, default: 300). >300s switches to hourly billing.","type":"number"}},"required":[],"type":"object"}},"type":"object"},"output":{"properties":{"example":{"properties":{"result":{"type":"object"}},"type":"object"}},"type":"object"}},"type":"object"},"history":[{"day":"2026-09-24","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.011,"price_match":true,"latency_ms":248,"error":null}],"description_full":"Create a managed Python 3.11 sandbox. Two billing modes selected by 'timeout': ≤300s = flat rate (CPU $0.01, GPU varies). >300s = per-hour billing for the full requested lifetime, no refund on early terminate. Max 24h.","last_updated":"2026-09-23T08:17:44.435Z","schemes":["exact"]}