Endpoint
Request
Headers
Body Parameters
Either
template_id or template_name must be provided. Resources (vcpu, memory, disk) are always loaded from the template - you cannot specify custom resources.Example Request
Replace
$HOPX_API_KEY with your actual API key from console.hopx.dev, or set it as an environment variable: export HOPX_API_KEY="your-API key-here"Replace
$HOPX_API_KEY with your actual API key from console.hopx.dev, or set it as an environment variable: export HOPX_API_KEY="your-API key-here"Response
Success (201 Created)
Response Fields
Status Codes
Errors
Template Not Found (404)
template_id or template_name doesn’t exist.
Fix: List available templates using GET /v1/templates to find valid template IDs or names.
Invalid Request (400)
timeout_secondsmust be positive- Either
template_idortemplate_namemust be provided env_varsmust be a valid object
Service Unavailable (503)
Use Cases
Quick Code Execution
Create a sandbox for quick code execution:Long-Running Job
Create a sandbox for a long-running task:Region-Specific Deployment
Create a sandbox in a specific region:Related
- SDK: Sandbox.create() - Python SDK method
- Get Sandbox - Retrieve sandbox information
- List Sandboxes - Query all your sandboxes
- VM Agent API - Execute code in your new sandbox
- CLI Sandbox Commands - Manage sandboxes from CLI
Next Steps
- Get Sandbox - Retrieve sandbox information
- List Sandboxes - Query all your sandboxes
- VM Agent API - Execute code in your new sandbox

