CodeEdit
Code execution without LLM
Code execution without LLM
Every request needs a credential — see Authentication.
| Method | Path | Summary |
|---|
POST | /sandbox/codeedit/v1/executions | Execute |
GET | /sandbox/codeedit/v1/executions/{execution_id} | Poll an async execution |
POST | /sandbox/codeedit/v1/executions/async | Admit an execution without holding the connection |
GET | /sandbox/codeedit/v1/languages | List Languages |
Accepted on every endpoint on this page.
| Name | In | Type | Required | Description |
|---|
x-correlation-id | header | string | no | End-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. |
POST /sandbox/codeedit/v1/executions
| Name | In | Type | Required | Description |
|---|
X-Sandbox-Project-Id | header | string | null | no | Project 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-Id | header | string | null | no | Tenant for this request. Must match the credential's tenant when the credential carries one. |
application/json, required — ExecutionRequest
| Field | Type | Required | Description |
|---|
language | string | yes | |
files | object | no | |
stdin | string | null | no | |
limits | ResourceLimits | null | no | |
labels | object | no | Consumer tags for analytics (trainer, pass, program, …). |
input_archive | ArchiveInput | null | no | Signed GET URL (storage.googleapis.com), sha256 and size of an archive made available read-only at /input. Recipes with archive_io only (else 422); needs archive I/O enabled and a registered Google service-account caller (else 403). Prefer POST /v1/executions/async: transfers can exceed the gateway's ~1560s synchronous limit. |
output_archive | ArchiveOutput | null | no | Signed PUT URL (storage.googleapis.com) that /output is uploaded to as a tar after a successful run; the result carries its sha256 and size. The tar is untrusted: extract it safely (e.g. Python tarfile filter='data'). Same access rules as input_archive; prefer the async endpoint. |
| Status | Description | Body |
|---|
200 | Successful Response | object |
403 | The credential may not run the recipe, or archive fields were sent while archive I/O is not enabled or by a caller that is not a registered Google service account. | — |
413 | Submitted files exceed the total payload limit. | — |
422 | Invalid request, including input_archive / output_archive on a recipe without archive_io or a malformed signed URL. Validation errors never echo request values. | HTTPValidationError |
429 | The 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. | — |
503 | The recipe requires a signed image and this environment enforces it, and the image could not be verified. Nothing was started and no quota was used. detail.code is one of image_not_pinned, image_registry_unsupported, signature_key_not_configured, signature_key_invalid, signature_missing, signature_invalid, signature_digest_mismatch or signature_registry_error; only the last is transient and carries Retry-After. | — |
GET /sandbox/codeedit/v1/executions/{execution_id}
| Name | In | Type | Required | Description |
|---|
execution_id | path | string | yes | |
X-Sandbox-Project-Id | header | string | null | no | Project 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-Id | header | string | null | no | Tenant for this request. Must match the credential's tenant when the credential carries one. |
| Status | Description | Body |
|---|
200 | Successful Response | object |
404 | Unknown or expired execution id, or one owned by another project. | — |
422 | Validation Error | HTTPValidationError |
POST /sandbox/codeedit/v1/executions/async
Same work as POST /v1/executions, answered with 202 and an execution_id as soon as it is admitted. Poll poll_url until status is completed; result then has the sync response body. A project at its concurrency limit waits in the queue instead of getting 429.
| Name | In | Type | Required | Description |
|---|
X-Sandbox-Project-Id | header | string | null | no | Project 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-Id | header | string | null | no | Tenant for this request. Must match the credential's tenant when the credential carries one. |
application/json, required — ExecutionRequest
| Field | Type | Required | Description |
|---|
language | string | yes | |
files | object | no | |
stdin | string | null | no | |
limits | ResourceLimits | null | no | |
labels | object | no | Consumer tags for analytics (trainer, pass, program, …). |
input_archive | ArchiveInput | null | no | Signed GET URL (storage.googleapis.com), sha256 and size of an archive made available read-only at /input. Recipes with archive_io only (else 422); needs archive I/O enabled and a registered Google service-account caller (else 403). Prefer POST /v1/executions/async: transfers can exceed the gateway's ~1560s synchronous limit. |
output_archive | ArchiveOutput | null | no | Signed PUT URL (storage.googleapis.com) that /output is uploaded to as a tar after a successful run; the result carries its sha256 and size. The tar is untrusted: extract it safely (e.g. Python tarfile filter='data'). Same access rules as input_archive; prefer the async endpoint. |
| Status | Description | Body |
|---|
202 | Successful Response | object |
400 | Unknown or disabled language. | — |
403 | The credential may not run the recipe, or archive fields were sent while archive I/O is not enabled or by a caller that is not a registered Google service account. | — |
413 | Submitted files exceed the total payload limit. | — |
422 | Invalid request, including input_archive / output_archive on a recipe without archive_io or a malformed signed URL. Validation errors never echo request values. | HTTPValidationError |
503 | This replica already holds its maximum number of queued runs, or the recipe's image signature could not be verified (detail.code, see POST /v1/executions). Nothing was admitted; retry after Retry-After when it is present. | — |
GET /sandbox/codeedit/v1/languages
| Status | Description | Body |
|---|
200 | Successful Response | object |
The object shapes referenced above.
Where to fetch the input archive from, and what it must be.
| Field | Type | Required | Description |
|---|
url | string | yes | V4 signed GET URL on storage.googleapis.com. |
sha256 | string | yes | Lowercase hex SHA-256 of the archive. |
size_bytes | integer | yes | Exact archive size in bytes. |
| Field | Type | Required | Description |
|---|
url | string | yes | V4 signed PUT URL on storage.googleapis.com. |
headers | object | null | no | Extra headers the signed PUT URL requires, sent verbatim on the upload. Allowed names (case-insensitive): x-goog-if-generation-match (digits), x-goog-content-length-range (min,max, digits, min <= max) and content-type (a plain MIME type, default application/x-tar). Any other header or value is rejected. When x-goog-if-generation-match is set the upload is attempted once, and a max below the tar size fails the run as output too large. |
| Field | Type | Required | Description |
|---|
language | string | yes | |
files | object | no | |
stdin | string | null | no | |
limits | ResourceLimits | null | no | |
labels | object | no | Consumer tags for analytics (trainer, pass, program, …). |
input_archive | ArchiveInput | null | no | Signed GET URL (storage.googleapis.com), sha256 and size of an archive made available read-only at /input. Recipes with archive_io only (else 422); needs archive I/O enabled and a registered Google service-account caller (else 403). Prefer POST /v1/executions/async: transfers can exceed the gateway's ~1560s synchronous limit. |
output_archive | ArchiveOutput | null | no | Signed PUT URL (storage.googleapis.com) that /output is uploaded to as a tar after a successful run; the result carries its sha256 and size. The tar is untrusted: extract it safely (e.g. Python tarfile filter='data'). Same access rules as input_archive; prefer the async endpoint. |
| Field | Type | Required | Description |
|---|
detail | ValidationError[] | no | |
| Field | Type | Required | Description |
|---|
wall_time_ms | integer | no | Default: 5000. |
memory_mb | integer | no | Default: 256. |
pids | integer | no | Default: 64. |
output_bytes | integer | no | Default: 1048576. |
filesystem_mb | integer | no | Default: 64. |
| Field | Type | Required | Description |
|---|
loc | string | integer[] | yes | |
msg | string | yes | |
type | string | yes | |
input | any | no | |
ctx | object | no | |
Machine-readable spec: OpenAPI YAML.