API
Evaluate a program
POST
https://api.cons.stneto.dev/v1/evalBearer keyRequest
Needs an API key as a bearer token. See Authentication.
Body EvalRequest · application/json
| Field | Description |
|---|---|
sourcestring · required | Scheme source. At most 64 KB on the API, 4 KB on the demo. |
timeout_msinteger · optional | Wall-clock limit. API default 1000, max 5000. The demo uses 500 and allows at most 500. |
Responses
| Status | Meaning |
|---|---|
| 200 | The program ran. Check status for the outcome.Headers: RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset |
| 400 | The body isn't valid JSON (invalid_json). |
| 401 | Missing, malformed, unknown or revoked key (unauthorized). |
| 413 | Source over the limit (source_too_large) or body over 1 MB (request_too_large). |
| 422 | Missing or non-string source, or bad timeout_ms (invalid_request). |
| 429 | Per-key rate limit (rate_limited, 60/min), too many concurrent evals for the account (too_many_in_flight, 4), or the monthly CPU quota is used up (cpu_quota_exceeded). Headers: Retry-After |
| 503 | Every evaluation slot is taken (busy). Retry shortly. |
Response body EvalResponse
| Field | Description |
|---|---|
statusstring · required | One of ok, error, timeout, limit_exceeded. |
resultsResult[] · required | The forms that finished, in order. |
stdoutstring · required | — |
stdout_truncatedboolean · required | — |
statsStats · required | — |
errorEvalError | null · required | — |
request_idstring · required | — |