Sandbox API

CodeEdit

Code execution without LLM

Code execution without LLM

Every request needs a credential — see Authentication.

MethodPathSummary
POST/sandbox/codeedit/v1/executionsExecute
GET/sandbox/codeedit/v1/languagesList Languages

Common headers

Accepted on every endpoint on this page.

NameInTypeRequiredDescription
x-correlation-idheaderstringnoEnd-to-end correlation id for this eval run. When set, the gateway and downstream services honor it verbatim in logs, Cloud Trace span attributes, async job payloads, and Langfuse trace.id. When omitted, the gateway generates a ULID and echoes it on the response.

Endpoints

Execute

POST /sandbox/codeedit/v1/executions

Parameters

NameInTypeRequiredDescription
X-Sandbox-Project-Idheaderstring | nullnoProject to bill and rate-limit this request against. Validated against the credential: a project-scoped token may only name its own project, and gets 403 otherwise. Defaults to the token's project when omitted.
X-Sandbox-Tenant-Idheaderstring | nullnoTenant for this request. Must match the credential's tenant when the credential carries one.

Request body

application/json, required — ExecutionRequest

FieldTypeRequiredDescription
languagestringyes
filesobjectno
stdinstring | nullno
limitsResourceLimits | nullno

Responses

StatusDescriptionBody
200Successful Responseobject
413Submitted files exceed the total payload limit.
422Validation ErrorHTTPValidationError
429The project is already running its maximum number of concurrent executions. This is backpressure, not failure: the work was never started, so retrying after the interval in Retry-After is safe and will not duplicate anything. The limit is per project, so spreading load across projects raises it; a single client should cap its own concurrency rather than rely on retries.

List Languages

GET /sandbox/codeedit/v1/languages

Responses

StatusDescriptionBody
200Successful Responseobject

Schemas

The object shapes referenced above.

ExecutionRequest

FieldTypeRequiredDescription
languagestringyes
filesobjectno
stdinstring | nullno
limitsResourceLimits | nullno

HTTPValidationError

FieldTypeRequiredDescription
detailValidationError[]no

ResourceLimits

FieldTypeRequiredDescription
wall_time_msintegernoDefault: 5000.
memory_mbintegernoDefault: 256.
pidsintegernoDefault: 64.
output_bytesintegernoDefault: 1048576.
filesystem_mbintegernoDefault: 64.

ValidationError

FieldTypeRequiredDescription
locstring | integer[]yes
msgstringyes
typestringyes
inputanyno
ctxobjectno

Machine-readable spec: OpenAPI YAML.