---
title: "Unified Code Execute"
method: POST
path: "/v1/code/execute"
tags: ["Unified Agent APIs"]
---

# Unified Code Execute

`POST /v1/code/execute`

Execute code in a secure, isolated sandbox and return stdout, stderr, exit code, and output files.

## Request body

- CodeExecuteRequest — Execute code in an isolated sandbox.
  - `code` string, required — The code to execute
  - `language` string — Programming language: python, javascript, or shell
  - `timeout` integer — Maximum execution time in seconds (1-300)
  - `template` string, nullable — Pre-configured environment: default, data-science, web-dev, video
  - `input_files` InputFile[] — Files to upload to the sandbox before execution — unresolved $ref
  - `packages` string[] — Additional pip packages to install before execution

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/suprsonic/apis/suprsonic-unified-agent-api.md) · [All operations](https://skmtc.dev/suprsonic/apis/suprsonic-unified-agent-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/suprsonic/suprsonic-unified-agent-api/revisions/2e9e8abc82a5/schema)
