Skip to main content
The HopX API uses a consistent data model across all endpoints. Understanding these core resources and their relationships is essential for effective API usage.

Core Resources

Sandbox

A sandbox is an isolated virtual machine environment for code execution. Each sandbox has:

Sandbox Statuses

Sandbox Lifecycle

Template

A template defines the base image and resources for creating sandboxes:

Template Categories

  • python - Python environments (various versions)
  • nodejs - Node.js environments
  • ubuntu - Ubuntu base images
  • code-interpreter - Multi-language execution environments
  • custom - Custom organization templates

Execution Result

Result from code execution or command: For rich output capture, additional fields: Each rich output object:

Process

Background execution process:

Object Types

All API responses include an object field identifying the resource type:

List Objects

List endpoints return a consistent structure:

Timestamps

All timestamps use ISO 8601 format with UTC timezone:
Example timestamps:
  • created_at - Resource creation time
  • updated_at - Last modification time
  • completed_at - Task completion time
  • expires_at - Expiration time
  • token_expires_at - JWT token expiration

Identifiers

Format

Identifiers follow consistent patterns:

Usage

  • Identifiers are case-sensitive
  • Store identifiers as returned by the API
  • Use template name or id when creating sandboxes

Resource Relationships

  • One template can create multiple sandboxes
  • Each sandbox has one JWT token (refreshable)
  • Each sandbox can have multiple concurrent processes/executions

Common Patterns

Create → Poll → Use

Next Steps