BlockRun
AI tools / Secure Runtime API

Run untrusted agent code in a sandbox you pay for per session

Create an isolated runtime, execute code in it and tear it down, billed per sandbox and per operation in USDC. No cluster to run and no platform subscription.

What it does

Four requests: create a sandbox on a managed Python image — CPU by default, or a GPU type on request — then exec a command inside it and read stdout, stderr and the exit code, poll its status, and terminate it. Create carries the sandbox price; each of the other three is a small per-operation price.

A short-lived CPU sandbox is the flat rate on the card. A GPU type prices the create call above it by tier, and a lifetime beyond the flat-rate window bills it by the hour for the whole lifetime you requested, up front, with no refund on early terminate — the parameter table below carries the exact window, caps and GPU types the route enforces, and the 402 quotes the exact figure before anything runs.

The call

One endpoint, priced in dollars before it runs and settled in USDC. No API key and no account — the request pays for itself.

POST /api/v1/modal/sandbox/create
Host: blockrun.ai

Request parameters

fieldtype
imagestring
timeoutnumber
cpunumber
memorynumber
gpustring

* required

Why per call

No seat, no minimum, no contract per vendor. Each request is quoted in dollars before it runs and settles on-chain, so an agent can pay for its own work without a human holding a credit card. How the payment works →

Questions

Why sandbox agent code at all?

Model-written code is untrusted input. Running it in an isolated runtime keeps it away from your own environment.

How is it billed?

One price to create a sandbox and a smaller one per operation, both quoted before the call runs.

Does the sandbox persist?

It lasts for the session you create and is torn down explicitly; there is nothing left running to be billed for.

What can run inside it?

Arbitrary code execution with inspection — the docs carry the exec and status shapes.