---
title: "Run Python 3.12, Node.js 22 or bash code (passed on stdin)"
method: POST
path: "/sandboxes/{id}/run"
tags: ["sandboxes"]
---

# Run Python 3.12, Node.js 22 or bash code (passed on stdin)

`POST /sandboxes/{id}/run`

## Request

- Base URL: `https://api.eqvps.com/api/v1/eqvps`
- URL: `https://api.eqvps.com/api/v1/eqvps/sandboxes/{id}/run`
- Auth: HTTP bearer

## Path parameters

- `id` string, required

## Request body

- RunCode
  - `language` 'python' | 'node' | 'bash', required
  - `code` string, required
  - `timeout` integer: Seconds. Synchronous: max 55 (default 30). With async: up to the sandbox's remaining lifetime (default).
  - `async` boolean: Run as a background task: returns 202 TaskStarted immediately; poll GET /sandboxes/{id}/tasks/{task_id}.
  - `env` SbxEnv: Environment variables for the process. Up to 64 names, 32 KB per value, 64 KB total. Values are stored encrypted, never returned by the API and not logged; responses show only env_keys. On create: applied to every exec/run in the sandbox. On exec/run: applied to that call and merged over the sandbox env.

## Response `200`

Execution result

- ExecResult
  - `exit_code` integer
  - `stdout` string
  - `stderr` string
  - `timed_out` boolean
  - `truncated` boolean
  - `duration_ms` integer

## Other responses

- `202`: Background task started (async: true)
- `404`: not_found
- `409`: sandbox_paused / sandbox_not_running / conflict
- `422`: invalid_request

---

[API](https://skmtc.dev/eqvps/apis/eqvps-api.md) · [All operations](https://skmtc.dev/eqvps/apis/eqvps-api/llms.txt) · [OpenAPI document](https://skmtc.dev/eqvps/apis/eqvps-api/revisions/2cbc15a2b088?raw)
