Modal · Schema
Modal Sandbox
A Modal Sandbox — a secure container for executing untrusted user or agent code with isolation, optional GPU, volumes, networking tunnels, and lifecycle hooks.
ServerlessGPUCloud ComputeAI InfrastructureSandboxesInferenceTrainingBatch ProcessingPythonTypeScriptGo
Properties
| Name | Type | Description |
|---|---|---|
| sandbox_id | string | |
| app_id | string | |
| state | string | |
| image | string | |
| entrypoint | array | |
| gpu | string | |
| cpu | number | |
| memory | integer | |
| timeout | integer | |
| idle_timeout | integer | |
| encrypted_ports | array | |
| unencrypted_ports | array | |
| tags | object | |
| created_at | string |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/api-evangelist/modal-com/main/json-schema/modal-sandbox-schema.json",
"title": "Modal Sandbox",
"description": "A Modal Sandbox — a secure container for executing untrusted user or agent code with isolation, optional GPU, volumes, networking tunnels, and lifecycle hooks.",
"type": "object",
"required": ["sandbox_id", "app_id", "state"],
"properties": {
"sandbox_id": { "type": "string" },
"app_id": { "type": "string" },
"state": {
"type": "string",
"enum": ["created", "scheduled", "started", "ready", "finished", "terminated"]
},
"image": { "type": "string" },
"entrypoint": {
"type": "array",
"items": { "type": "string" }
},
"gpu": { "type": "string" },
"cpu": { "type": "number", "minimum": 0.125 },
"memory": { "type": "integer", "minimum": 128 },
"timeout": { "type": "integer", "minimum": 1, "maximum": 86400 },
"idle_timeout": { "type": "integer", "minimum": 0 },
"encrypted_ports": {
"type": "array",
"items": { "type": "integer", "minimum": 1, "maximum": 65535 }
},
"unencrypted_ports": {
"type": "array",
"items": { "type": "integer", "minimum": 1, "maximum": 65535 }
},
"tags": {
"type": "object",
"additionalProperties": { "type": "string" }
},
"created_at": { "type": "string", "format": "date-time" }
}
}