Skip to content
Fourohtwo

Create a managed Python 3.11 sandbox

blockrun.ai/api/v1/modal/sandbox/create

Create a managed Python 3.11 sandbox. Two billing modes: ≤300s at ≤1 CPU and ≤1024 MB = flat rate (CPU $0.011, GPU varies). Otherwise per-hour billing for the full requested lifetime, never below the flat rate, no refund on early terminate. Max 24h.

BaseAnswering
POSThttps://blockrun.ai/api/v1/modal/sandbox/create

Uptime100% of 5 checks in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

// npm install fourohtwo
import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://blockrun.ai/api/v1/modal/sandbox/create", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"cpu":{"description":"CPU cores (min 0.125, max 1 CPU-only, 8 for GPU sandboxes, default: 1). Above 1 bills hourly, never below the flat rate.","type":"number"},"gpu":{"description":"Optional GPU type. One of: T4, L4, A10G, A100, H100. Flat (≤300s, ≤1 CPU, ≤1024 MB): T4 $0.051, L4 $0.081, A10G $0.101, A100 $0.201, H100 $0.401. Hourly: T4 $4, L4 $4.5, A10G $5, A100 $7, H100 $9/hour.","type":"strin),
});
console.log(await res.json());

Example input

{"cpu":{"description":"CPU cores (min 0.125, max 1 CPU-only, 8 for GPU sandboxes, default: 1). Above 1 bills hourly, never below the flat rate.","type":"number"},"gpu":{"description":"Optional GPU type. One of: T4, L4, A10G, A100, H100. Flat (≤300s, ≤1 CPU, ≤1024 MB): T4 $0.051, L4 $0.081, A10G $0.101, A100 $0.201, H100 $0.401. Hourly: T4 $4, L4 $4.5, A10G $5, A100 $7, H100 $9/hour.","type":"strin

More from BlockRun.AIProvider status