Preview
Sign inSign up
Public previewQuickstart

Scheme, evaluated over HTTP.

Send source to one endpoint. Get back the value of every top-level form, stdout, CPU-time stats and structured errors, from a fresh sandbox on every request.

Endpoint
POST /v1/eval
Language
Scheme, R7RS subset
Isolation
Fresh process per request
Billing
Per CPU-millisecond

POST /v1/demo

⌘↵to run

idle

; press Run to evaluate each top-level form

cpu
—
wall
—
steps
—

01Integrate

One endpoint. Any language that speaks HTTP.

Send JSON with a bearer key. A program that ran always comes back as 200 with its outcome in status, so an HTTP error only ever means the request itself was wrong.

  • Printed values exact for every type, bignums included
  • A typed JSON copy of numbers, strings, booleans and lists
  • RateLimit headers on every evaluation
curl -sS https://api.cons.stneto.dev/v1/eval \
  -H "Authorization: Bearer $CONS_KEY" \
  -H "Content-Type: application/json" \
  -d '{"source": "(define (sq x) (* x x))\n(map sq (list 1 2 3))"}'
200 OK · application/json
{
  "status": "ok",
  "results": [
    {"index": 0, "line": 1, "col": 1, "value": null, "json": null},
    {"index": 1, "line": 2, "col": 1, "value": "(1 4 9)", "json": [1, 4, 9]}
  ],
  "stdout": "",
  "stats": {"wall_ms": 0.21, "cpu_ms": 0.02, "steps": 25},
  "error": null,
  "request_id": "req_8k2j4h5g6f7d8s9a0p1o"
}

02Runtime

Built to run code you didn't write.

Programs from your users, from an LLM, from a config file. Each one runs isolated, with limits you can see before you hit them.

A fresh sandbox per request
Each program starts from a clean environment in its own process. Nothing is shared between requests.
A result for every form
Each top-level form returns its printed value, a typed JSON copy, and the line and column it came from.
Structured errors
Errors carry a stable type to match on, a message, and the form, line and column that failed.
Billed by CPU time
Waiting for a slot costs nothing. Each request is charged the CPU it used, rounded up to the millisecond.
Hard limits
Wall-clock timeouts, step and memory caps and integer size limits stop runaway programs early.
OpenAPI spec
Generate a client from the spec, or read the endpoint docs built from it.

03Lifecycle

What happens to a request.

Every check that can turn a request away runs before your program does, and each one answers with its own status and error type.

  1. 01

    Authenticate

    The bearer key is checked and the body validated.

    401422

  2. 02

    Rate limit

    Requests per minute per key, then evaluations in flight per account.

    429

  3. 03

    Reserve CPU

    The timeout is reserved against the month's CPU allowance up front.

    429

  4. 04

    Evaluate

    A fresh process runs the program under step, memory and time limits.

    503

  5. 05

    Settle

    The reservation settles to the CPU used, and the response goes out.

    200

04Pricing

Pay for CPU, not for waiting.

Each request is charged max(1, ceil(cpu_ms)). Time spent queued or blocked isn't, and failed programs pay only for the CPU they used.

Free every month, on every plan
600CPU-s
Billing granularity
1ms
Charged for time spent queued
0ms

> (eval 'your-program)

Start evaluating Scheme today.

Sign up, create a key and send your first request. The first 600 CPU-seconds each month are free.

esc