Overview
Execute code in a secure sandbox with pre-configured environments
Credits
2 credits per call
Providers
E2B
SDK Method
client.execute_code(...)
Parameters
codeRequiredstring
The code to execute.
languageselect (default: python)
Programming language.
Python
JavaScript
Shell
timeoutnumber (default: 30)
Max execution time (1-300s).
templateselect (default: default)
Pre-configured environment.
Default
Data Science
Web Dev
Video
Example Response
{
"success": true,
"data": {
"stdout": "Hello from Python 3.13\n",
"stderr": "",
"exit_code": 0,
"execution_time_ms": 730,
"output_files": [],
"sandbox_boot_ms": 537,
"template_used": "default"
},
"metadata": {
"provider_used": "e2b",
"providers_tried": [
"e2b"
],
"mode_used": null,
"response_time_ms": 2085,
"request_id": "req_50b9c743"
},
"credits_used": 2
}Get Started
Use this API through the O-mega platform. Create an API key in your dashboard, then call the endpoint with your key in the Authorization header.