Base URL
Authentication
All API requests require authentication via API key. Include your API key in the request headers: Header Options:X-API-Key: your_api_key_here(Recommended)Authorization: Bearer your_api_key_here(Alternative)
API Structure
The API is organized into two main sections:1. Lifecycle API
Control plane operations for managing sandboxes and templates:- Sandbox Management: Create, list, get, delete, start, stop, pause, resume sandboxes
- Template Management: List and get template information
/v1/sandboxes, /v1/templates
2. VM Agent API
Data plane operations for interacting with running sandboxes:- Code Execution: Execute code in multiple languages
- File Operations: Read, write, upload, download files
- Commands: Run shell commands
- Process Management: List and manage background processes
- Environment Variables: Manage runtime environment variables
- Metrics: Get sandbox metrics and health status
- Cache: Manage cache operations
- Desktop: Desktop automation (if available)
- WebSocket: Real-time streaming operations
https://{sandbox_id}.hopx.dev (direct to VM agent)
Request Format
Headers
All requests should include:Request Body
POST and PUT requests should include a JSON body:Response Format
Success Response
Error Response
HTTP Status Codes
| Code | Meaning |
|---|---|
| 200 | Success |
| 201 | Created |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 429 | Rate Limit Exceeded |
| 500 | Server Error |
Rate Limits
API requests are rate-limited per organization. Rate limit information is included in response headers:X-RateLimit-Limit: Maximum requests per windowX-RateLimit-Remaining: Remaining requests in current windowX-RateLimit-Reset: Time when the rate limit resets
Getting Started
- Get an API Key: Create an API key in the dashboard
- Make Your First Request: See Authentication for details
- Create a Sandbox: See Create Sandbox
Code Examples
All API reference pages include examples in:- Python - Using
requestslibrary - JavaScript - Using
fetchAPI - cURL - Command-line examples

