Back to APIs

Unified Agent API

Code Execution

Code Execution

Execute Python, JavaScript, or shell code in an isolated Firecracker microVM sandbox.

POST/v1/code/execute

Overview

Execute code in a secure sandbox with pre-configured environments

Parameters

code

Required

string

The code to execute.

language

select (default: python)

Programming language.

Python
JavaScript
Shell

timeout

number (default: 30)

Max execution time (1-300s).

template

select (default: default)

Pre-configured environment.

Default
Data Science
Web Dev
Video

Example Response

{"success":true,"data":{"stdout":"Hello, world!\n","exit_code":0,"execution_time_ms":47},"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.

Try Code Execution

Test Code Execution in the interactive playground. No setup required.

Open Playground
Code Execution API | Unified Agent APIs | suprsonic