Getting started
Introduction
cons evaluates Scheme over HTTP. Send source to one endpoint and get back the value of every top-level form, stdout, CPU-time stats and structured errors.
Every request runs in a fresh sandbox with time, step and memory limits, and is billed by the CPU time it used. Each account gets 600 CPU-seconds a month for free. This page takes you from nothing to a first response.
1. Get a key
Create an account, then create a key on the API keys page. Keys start with cons_ and are shown once. Put yours in an environment variable:
2. Send a program
POST /v1/eval takes a JSON body with the Scheme source and an optional timeout_ms. The source can hold any number of top-level forms.
3. Read the response
Each top-level form that finished gets a result, in order. value is the printed form and json is a typed copy you can use directly.
HTTP status describes the request, not the program
A program that ran always comes back as 200, even when it failed. Check status for the outcome: ok, error, timeout or limit_exceeded.