Leap0

Code Interpreter API

Reference and overview for persistent code execution inside a sandbox.

The Code Interpreter API runs inside a sandbox and is exposed at https://<sandbox_id>.sandbox.leap0.dev.

Use it to execute Python and TypeScript code in persistent interpreter sessions, either synchronously or through streaming responses.

Create the sandbox using the system/code-interpreter:v0.1.0 template.

Base URL

https://<sandbox_id>.sandbox.leap0.dev

Authentication

No additional authentication is required for the Code Interpreter API itself because it runs inside the sandbox.

You only need your Leap0 API key to create and access the sandbox through the main Leap0 API.

What It's For

  • Run Python code in a persistent session
  • Run TypeScript code in a persistent session
  • Stream execution results back to your app
  • Keep interpreter state alive between calls

Was this page helpful?

On this page