Vertal Run documentation
How to run code safely with Vertal Run, from your first API call to running your own infrastructure.
Overview
Vertal Run is Vertal Company’s secure code-execution platform. You send code; Vertal Run runs it in a fresh, isolated sandbox and returns the output. It was built for:
- AI agents that write and run code (data analysis, automation, tool use).
- Developer products that need to execute user code: playgrounds, courses, IDEs, notebooks.
- Platforms that want per-tenant quotas, metering and billing for code execution.
You use it through the HTTP API; the Python SDK and the MCP server for AI agents are coming soon as a public package. Supported languages: Python 3.11, JavaScript (Node.js 20), Bash 5.2, Go 1.24 and Rust (stable). A run typically takes 1 to 4 seconds end to end, including starting its sandbox.
Quickstart
1. Get an API key
Create a free account at vertalrun.com/signin and generate a key in your dashboard, which also gives you ready-to-paste MCP, Claude Code, HTTP and SDK snippets. Keys look like kubo_sk_…. They are shown once and stored only as a SHA-256 hash, so keep yours in a secrets manager or an environment variable. An account can have up to 5 active keys and revoke any of them from the dashboard.
export KUBO_API_KEY="kubo_sk_..."
2. Run your first program
curl -X POST https://vertalrun.com/api/v1/executions \
-H "Authorization: Bearer $KUBO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"language": "python", "code": "print(6 * 7)"}'
{
"id": "exe_9392448a9b514e3f90193963b7d948d0",
"status": "succeeded",
"stdout": "42\n",
"stderr": "",
"exit_code": 0,
"duration_ms": 1480,
"truncated": false,
"usage": {"sandbox_seconds": 1.48},
"request_id": "req_be05ea1492f949f8a0617a4f3cd738cc"
}
3. Try it in the browser
Open the playground, paste your key and press Run (or Ctrl/⌘ + Enter).
Core concepts
| Concept | What it means |
|---|---|
| Execution | One program run. It has an id (exe_…), a status, output, an exit code and a duration. You can fetch it later. |
| Sandbox | A fresh, isolated environment created for each execution and destroyed afterwards. Nothing persists between executions. |
| Tenant | The account an API key belongs to. Executions, usage and quotas are scoped to the tenant; tenants never see each other’s data. |
| Plan | Free, Pro or Enterprise. Sets daily quota, rate limit, maximum run time and sandbox memory. |
| Request ID | Every response carries request_id and an X-Request-Id header. Include it when you contact support. |
Execution status values:
| Status | Meaning |
|---|---|
succeeded | The program exited with code 0. |
failed | The program exited with a non-zero code. Read stderr and exit_code. |
timeout | The program ran longer than timeout_s; the sandbox was killed. exit_code is null. |
error | The sandbox could not start. Retry later; this is not caused by your code. |
Authentication
Send your key as a bearer token on every request except GET /health:
Authorization: Bearer kubo_sk_...
- Keep keys on your server. Never ship them in a mobile app, a browser bundle or a public repository.
- Use one key per environment (development, production) and per service.
- A revoked key stops working immediately and returns
401 unauthorized.
Operators create and revoke keys with the CLI. You can rotate your own key at any time with POST /v1/keys/rotate: you get a new key and the old one stops working immediately.
API reference
Base URL: https://vertalrun.com/api. Requests and responses are JSON (UTF-8).
POST/v1/executions
Runs code in a new sandbox and waits for it to finish.
| Field | Type | Required | Description |
|---|---|---|---|
language | string | yes | python, javascript, bash, go or rust. Go and Rust programs are compiled first; compile time does not count against the plan’s time limit. |
code | string | yes | Program source, up to 128 KB. It is passed on standard input. |
timeout_s | number | no | Maximum run time in seconds. Default 10, capped by your plan. |
Response fields: id, status, stdout, stderr, exit_code, duration_ms, truncated (true if the output went over 64 KB per stream), usage.sandbox_seconds, request_id.
Safe retries. Add an Idempotency-Key header (1 to 255 characters: letters, digits, . _ : -). If the same key arrives again with the same body, you get the first result back with "idempotent_replay": true, and the code does not run or count against your quota again. The same key with a different body returns 409 idempotency_conflict.
curl https://vertalrun.com/api/v1/executions \
-H "Authorization: Bearer $KUBO_API_KEY" \
-H "Idempotency-Key: order-1234" \
-H "Content-Type: application/json" \
-d '{"language": "python", "code": "print(6 * 7)"}'
GET/v1/executions/{id}
Returns a stored execution, including language and created_at (Unix time). Only the tenant that created it can read it; anyone else gets 404.
GET/v1/usage
Returns today’s usage (UTC) and your plan limits.
{
"tenant": "kubo-vibe",
"plan": "pro",
"today": {"executions": 3, "sandbox_seconds": 2.635},
"limits": {"executions_per_day": 10000, "requests_per_minute": 120, "max_timeout_s": 60}
}
POST/v1/keys/rotate
Issues a new key for your account (same plan) and revokes the key used for the call. The new key is shown once:
{"api_key": "kubo_sk_...", "key_id": "key_...", "revoked_key_id": "key_...", "plan": "pro"}GET/v1/openapi.json
Public OpenAPI 3.1 description of the API. Import it into agent frameworks, API clients or code generators to get typed tools such as runCode.
GET/health
Public liveness check: {"status": "ok", "version": "0.2.0"}.
Errors
Errors use one shape, and never include stack traces or internal details:
{"error": {"code": "quota_exceeded", "message": "daily quota of 100 executions reached"}, "request_id": "req_..."}
| HTTP | Code | What to do |
|---|---|---|
| 400 | invalid_language, invalid_code, invalid_timeout, invalid_json, invalid_content_length, invalid_idempotency_key | Fix the request. |
| 401 | unauthorized | Check the key; it may be missing, wrong or revoked. |
| 403 | forbidden | The API origin was called directly. Use https://vertalrun.com/api. |
| 404 | not_found | Unknown endpoint, or an execution of another tenant. |
| 409 | idempotency_conflict | You reused an Idempotency-Key with a different body. Use a new key. |
| 413 | code_too_large, body_too_large | Keep code under 128 KB and the body under 256 KB. |
| 429 | rate_limited | Too many requests per minute. Wait for the Retry-After seconds and retry. |
| 429 | quota_exceeded | Daily quota reached. Wait for the next UTC day or upgrade. |
| 500 | internal | Retry; contact support with the request_id if it persists. |
| 503 | capacity_exhausted | All sandboxes are busy. Retry after Retry-After seconds, with the same Idempotency-Key. |
| 502 / 503 | api_unreachable, api_not_configured | The platform behind the edge is down or not connected yet. |
Plans & limits
| Plan | Executions / day | Requests / min | Max run time | Sandbox memory |
|---|---|---|---|---|
| Free | 100 | 10 | 10 s | 256 MB |
| Pro | 10,000 | 120 | 60 s | 512 MB |
| Enterprise | 1,000,000 | 1,200 | 300 s | Custom |
Every plan also has these limits:
- 1 vCPU per sandbox and 64 processes/threads.
- Memory is a hard limit: a program that goes over it is killed (exit code 137).
- A private, writable home directory that is destroyed with the sandbox.
- No network access.
- 64 KB of output per stream.
Python SDK
The SDK has no dependencies (Python 3.10+) and is the vertal2kubo.client module.
from vertal2kubo.client import KuboClient, KuboError
client = KuboClient("https://vertalrun.com/api", "kubo_sk_...") # or KUBO_API_URL / KUBO_API_KEY env vars
result = client.run("print(sum(range(10)))", language="python", timeout_s=10)
print(result["status"], result["stdout"]) # succeeded 45
print(client.get(result["id"])["created_at"])
print(client.usage()["today"])
client.run("print(1)", idempotency_key="job-42") # retry-safe: same key, same result
client.rotate_key() # new key; the client switches to it
try:
client.run("x", timeout_s=999)
except KuboError as e:
print(e.status, e.code, e.request_id) # 400 invalid_timeout req_...
CLI
# Clients (package coming soon)
export KUBO_API_URL=https://vertalrun.com/api KUBO_API_KEY=kubo_sk_...
python -m vertal2kubo run "print('hello')"
python -m vertal2kubo run "console.log(6*7)" --language javascript --timeout 5
MCP for AI agents
Vertal Run is a remote MCP server (Streamable HTTP) at https://vertalrun.com/mcp. ChatGPT, Codex, Claude, Cursor, DeepSeek Harness and any other MCP client get four tools that run on your account, with the same plan, daily quota, rate limit and metering as the HTTP API.
| Tool | Input | Output |
|---|---|---|
run_code | code, language (default python), timeout_s | Execution id, status, stdout, stderr, exit code, duration. A program that fails is still a result the agent reads; quota, rate-limit and timeout refusals come back as tool errors. |
get_execution | execution_id | A past result of your account (kept 30 days). |
list_languages | None | The languages run_code accepts. |
get_usage | None | Plan, today’s executions and sandbox seconds, and the plan limits. |
Sign in with OAuth (ChatGPT, Codex, Claude): add the server URL https://vertalrun.com/mcp as a connector. The app registers itself, sends you to the Vertal Run consent screen, and gets a token that lasts one hour and refreshes on its own. Revoke it from the app at any time.
Or use an API key (Claude Code, Cursor, DeepSeek Harness and scripts): send it as a bearer token.
claude mcp add --transport http vertal-run https://vertalrun.com/mcp --header "Authorization: Bearer kubo_sk_..."
{
"mcpServers": {
"vertal-run": {
"type": "http",
"url": "https://vertalrun.com/mcp",
"headers": {"Authorization": "Bearer kubo_sk_..."}
}
}
}
A local stdio server is also included in the package (python -m vertal2kubo.mcp with KUBO_API_URL=https://vertalrun.com/api and KUBO_API_KEY).
run_code call starts from a clean sandbox with no stdin. To carry data between steps, have the agent include it in the next program.Security
Every execution runs in its own Firecracker microVM, started from a clean template and destroyed when the execution ends. Vertal Run operates the open-source E2B runtime on its own servers; your code is never sent to a third-party sandbox API. Inside the microVM your program runs:
- with no network access;
- as an unprivileged user (uid 1000) with no supplementary groups and
no_new_privs, so it cannot become root (nosudo); - in its own cgroup with the plan’s memory limit (no swap) and a process limit;
- under a hard timeout, after which the microVM is killed.
- Edge: traffic goes through Cloudflare (TLS, DDoS protection). The API origin only accepts requests relayed by the Vertal Run edge, using a shared secret.
- Keys: stored as SHA-256 hashes and never written to logs. Passwords are stored as scrypt hashes.
- Output: treat program output as untrusted input. The playground renders it as escaped text.
- Overload: when every sandbox is busy, requests get a fast
503withRetry-Afterinstead of waiting in an unbounded queue, and parallel bursts cannot exceed the daily quota. - Retention: your code is not stored; the output of each execution is kept for 30 days and then deleted automatically. See the Privacy Policy.
- Account deletion: delete your account, keys and stored output at any time from the dashboard or with
POST /v1/account/delete.
Architecture
client / agent
│ https://vertalrun.com/api
▼
Cloudflare edge Worker ── serves vertalrun.com (site + docs)
│ (+ edge secret)
▼
Vertal Run API ── auth · plans · quotas · rate limits · metering
│
▼
Self-hosted E2B runtime ── one Firecracker microVM per execution
(Python/JS/Bash, Go and Rust templates)
Frequently asked questions
Can my code access the internet?
No. Sandboxes have no network, by design.
Can I install packages?
Not at run time, because there is no network. The standard libraries of each language are available (Go and Rust: standard library only). Templates with preinstalled packages are on the roadmap.
Does state persist between executions?
No. Each execution gets a clean sandbox.
How is usage counted?
Each execution counts once toward the daily quota (UTC). Sandbox time is reported as sandbox_seconds.
Is Vertal Run open source?
Vertal Run runs on the open-source E2B runtime (Apache-2.0). Vertal Run’s own SDK, CLI and MCP server will be published as a public package (coming soon). Third-party components keep their own licenses.