{"uid":"cap_L_oFfZQS6Z9zqbWFXcIn-","slug":"modal-sandbox-create-32d05dbb","name":"Modal Sandbox Create","description":"Modal — Create a sandboxed compute environment (CPU by default, 300s timeout). Pass `gpu` (T4 | L4 | A10G | A100 | H100) for GPU workloads like model inference.","url":"https://vaaya.ai/api/run/modal/sandbox-create","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","$schema":"http://json-schema.org/draft-07/schema#","properties":{"gpu":{"enum":["T4","L4","A10G","A100","H100"],"type":"string"},"image":{"type":"string"},"command":{"anyOf":[{"type":"string","minLength":1},{"type":"array","items":{"type":"string","minLength":1},"minItems":1}]},"timeout":{"type":"integer","exclusiveMinimum":0}},"additionalProperties":true},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"},"pathParams":{"type":"object"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.05","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.25/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.25","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.25","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_eM0EqJTA_gOH6j3PVyzcF","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.25","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Creates a new sandboxed compute environment on Modal with configurable CPU or GPU (T4/L4/A10G/A100/H100), optional custom image, command, and timeout up to 300s.","exampleAgentPrompt":"Spin up a Modal sandbox with an A10G GPU and a 120-second timeout so I can run model inference — use the default image and start it now.","exampleUseCases":[{"title":"GPU sandbox for LLM inference","prompt":"Create a Modal sandbox with an A100 GPU and a 300-second timeout so I can run a large language model inference job."},{"title":"Sandboxed code execution environment","prompt":"Spin up a CPU-only Modal sandbox with a 60-second timeout to safely execute some untrusted Python code I need to test."},{"title":"Custom image ML workload","prompt":"Provision a Modal sandbox using the image 'pytorch/pytorch:2.1.0-cuda11.8-cudnn8-runtime' with an L4 GPU and run the command 'python train.py' with a 200-second timeout."}],"resultDescription":"Returns a sandbox object containing the sandbox ID and metadata needed to interact with the running sandbox — used to subsequently run commands or terminate the environment via sibling endpoints.","failureModes":["Invalid GPU type specified — must be one of T4, L4, A10G, A100, H100","Timeout value must be a positive integer","Image pull failure if a custom container image is unreachable or invalid","Sandbox creation may fail if Modal quota or capacity is exceeded","Payment failure if insufficient USDC balance for the $0.05 per-call fee"],"whenToPreferThis":"Use this endpoint when you need a fresh, isolated, sandboxed compute environment — especially for GPU workloads like model inference or training. It's the right choice when you need to programmatically spin up ephemeral containers on Modal without managing infrastructure directly. Prefer this over persistent cloud VMs when you want short-lived, disposable environments with a known timeout.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:51:27.990Z","isFirstParty":false}