Code Execution API

Run code anywhere.
AI generates it for you.

Send a prompt or code. Get results instantly. Python, JavaScript, TypeScript — sandboxed, secure, with your secrets injected safely.

terminal
# Generate + Execute with one API call
curl -X POST https://py-api.com/api/v1/generate \
  -H "x-api-key: pyapi_..." \
  -d '{
    "prompt": "Scrape top 5 Hacker News stories",
    "language": "python"
  }'

{
  "code": "import requests...",
  "output": "1. Show HN: ...\n2. ...",
  "exitCode": 0
}

AI Code Generation

Describe what you need in plain English. Claude generates production-ready code and executes it instantly.

Zero-Knowledge Encryption

Server never sees your code. Argon2id + XChaCha20-Poly1305. Decryption only inside the sandbox. Same approach as Signal & Apple.

Multi-Language

Python, JavaScript, TypeScript. Each execution runs in an isolated Firecracker microVM sandbox.

Package Management

Install any pip or npm package. Set persistent packages or add per-request. Up to 50 packages per user.

Audit Logging

Every execution and secret access logged with timestamps and IPs. SOC 2 and ISO 27001 ready.

Rate Limits & Quotas

Per-user rate limiting, daily execution quotas, and per-request timeouts. Built for production workloads.

Three steps to running code

01

Register & get your API key

One POST request. You get a JWT token and a persistent API key (pyapi_...) for all future requests.

02

Store your secrets (optional)

API keys, database passwords, tokens — encrypted with AES-256-GCM and injected as environment variables when your code runs.

03

Execute or Generate

Send code to /execute or a natural language prompt to /generate. Results in seconds, fully sandboxed.

Python JavaScript TypeScript Go (coming soon) Rust (coming soon) Ruby (coming soon)
<200ms
Sandbox Startup
PQ-Safe
ML-KEM-768
5+
Languages
99.9%
Uptime SLA

Works with any HTTP client

cURL, Python requests, Node.js fetch, Postman — or any language with HTTP support.

execute python
curl -X POST https://py-api.com/api/v1/execute \
  -H "x-api-key: pyapi_abc123" \
  -H "Content-Type: application/json" \
  -d '{
    "code": "import numpy as np\nprint(np.random.randn(5))",
    "language": "python",
    "packages": ["numpy"]
  }'
execute javascript
curl -X POST https://py-api.com/api/v1/execute \
  -H "x-api-key: pyapi_abc123" \
  -d '{
    "code": "const r = await fetch(process.env.API_URL); console.log(await r.json())",
    "language": "javascript"
  }'
store a secret
curl -X PUT https://py-api.com/api/v1/secrets/OPENAI_API_KEY \
  -H "x-api-key: pyapi_abc123" \
  -d '{
    "value": "sk-proj-...",
    "description": "OpenAI production key"
  }'

// Now use it in any execution:
import os
key = os.environ["OPENAI_API_KEY"]

Your code is yours. We can't read it.

Encrypt client-side. We store an opaque blob. Decryption happens only inside the isolated sandbox. Our server never sees your source code.

Master Password

Argon2id KDF (128MiB, GPU-resistant). Your password derives the encryption key. Never stored on our servers.

ML-KEM-768

NIST FIPS 203 post-quantum standard. Resistant to quantum computers. Same as Chrome TLS and AWS KMS.

XChaCha20-Poly1305

24-byte nonces eliminate collision risk. Constant-time by design. Used by Signal, Cloudflare, and WireGuard.

zero-knowledge flow
# 1. Encrypt code locally (or use /zk/encrypt helper)
curl -X POST https://py-api.com/api/v1/zk/encrypt \
  -H "x-api-key: pyapi_..." \
  -d '{"masterPassword": "MyP@ss!", "code": "print(42)"}'
{"encryptedPayload": {"v":1, "salt":"...", "nonce":"...", "ciphertext":"..."}}

# 2. Store encrypted blob (server can't read it)
curl -X PUT https://py-api.com/api/v1/zk/code/my-script \
  -H "x-api-key: pyapi_..." \
  -d '{"encryptedPayload": {...}}'

# 3. Execute — decryption inside sandbox only
curl -X POST https://py-api.com/api/v1/zk/execute/my-script \
  -H "x-api-key: pyapi_..." \
  -d '{"masterPassword": "MyP@ss!"}'
{"output": "42", "zeroKnowledge": true}
Argon2id ML-KEM-768 XChaCha20-Poly1305 HKDF-SHA256 FIPS 203 NIST PQC

Simple, transparent pricing

Start free. Scale as you grow.

Free
$0
forever
  • 10 executions / day
  • Python only
  • 3 secrets
  • 30s timeout
Pro
$49
per month
  • 1,000 executions / day
  • All languages
  • 100 secrets
  • 300s timeout
  • AI generation
  • Zero-knowledge encryption
  • Priority support
Enterprise
Custom
contact us
  • Unlimited executions
  • All languages
  • Unlimited secrets
  • Custom timeouts
  • Zero-knowledge + PQ
  • SSO / SAML
  • Dedicated support
  • SLA guarantee

Start executing code in 30 seconds

Register, get your API key, and run your first execution. No credit card required.

View API Docs GitHub