Leap0

Create context

Create a new execution context with a pre-assigned language and working directory.

POST/contexts

Create a new execution context with a pre-assigned language and working directory.

Authorization

BearerAuth
AuthorizationBearer <token>

API key passed as a Bearer token.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

language?string

Language runtime to use.

Value in"python" | "py" | "python3" | "typescript" | "ts" | "javascript" | "js" | "bun" | "node"
cwd?string

Working directory for the session.

Default"/home/user"

Response Body

application/json

application/json

curl -X POST "https://<sandbox_id>.sandbox.leap0.dev/contexts" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "V1StGXR8_Z5jdHi6B-myT",  "language": 1,  "cwd": "/home/user"}
{  "message": "Invalid request",  "errors": [    {      "field": "string",      "error": "string"    }  ]}