# Run a snippet
$ curl -X POST https://code.prim.sh/v1/run \
-H "X-402-Payment: $TOKEN" \
-d '{"language": "python", "code": "print(1+1)"}'
{ "stdout": "2\n", "stderr": "", "exit_code": 0 }
Run user-provided transforms on data without trusting their code in your main process.
Compile and execute small programs on demand — compilers, linters, formatters.
Give agents a scratchpad for experiments without risking your long-lived infrastructure.
Let agents spin up ephemeral coding environments for tutorials and explanations.
POST /v1/run # Run snippet
GET /v1/runs/:id # Check status
DELETE /v1/runs/:id # Cancel run
| Action | Cost | Notes |
|---|---|---|
| Run start | $0.001 | Includes 100ms |
| Extra 100ms | $0.0005 | Capped at 10s |
| Storage | Free | Ephemeral filesystem |