Skip to content
Hayonix

API reference · Schema

RunCodeRequest

  • languagestringrequired

    python (one interpreter per sandbox: state persists between runs), javascript (Node, a fresh process per run) or shell (bash, a fresh process per run)

    One ofpythonjavascriptshell

  • codestringrequired

    Machine-readable code

  • stdinstring

    Given to the code on standard input

  • timeout_secondsinteger

    Time limit (default 60)

    1–900

  • max_output_bytesinteger

    stdout + stderr cap; the run is cut off past it (default 1048576)

    1024–4194304

Example
{
  "language": "python",
  "code": "x = 21 * 2\nprint(x)",
  "timeout_seconds": 30
}

Used by